Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Laravel Integration Testing
Search
Fareez Ahamed
January 31, 2016
Programming
3
140
Laravel Integration Testing
Slides of Laravel Integration Testing talk at Laravel Chennai Meetup #3
Fareez Ahamed
January 31, 2016
Tweet
Share
More Decks by Fareez Ahamed
See All by Fareez Ahamed
Access Control in Laravel
fareez
4
260
Other Decks in Programming
See All in Programming
360° Signals in Angular: Signal Forms with SignalStore & Resources @ngLondon 01/2026
manfredsteyer
PRO
0
120
Oxlintはいいぞ
yug1224
5
1.3k
izumin5210のプロポーザルのネタ探し #tskaigi_msup
izumin5210
1
110
Spinner 軸ズレ現象を調べたらレンダリング深淵に飲まれた #レバテックMeetup
bengo4com
1
230
ぼくの開発環境2026
yuzneri
0
220
Fluid Templating in TYPO3 14
s2b
0
130
MUSUBIXとは
nahisaho
0
130
Data-Centric Kaggle
isax1015
2
770
CSC307 Lecture 06
javiergs
PRO
0
680
humanlayerのブログから学ぶ、良いCLAUDE.mdの書き方
tsukamoto1783
0
190
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
690
Package Management Learnings from Homebrew
mikemcquaid
0
220
Featured
See All Featured
The Mindset for Success: Future Career Progression
greggifford
PRO
0
240
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
0
270
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
160
My Coaching Mixtape
mlcsv
0
48
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
0
2.3k
The Cult of Friendly URLs
andyhume
79
6.8k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
110
Six Lessons from altMBA
skipperchong
29
4.1k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Writing Fast Ruby
sferik
630
62k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
110
Fireside Chat
paigeccino
41
3.8k
Transcript
Laravel Integration Testing
I’m Fareez Ahamed
SSE @ Mphasis
Why Integration Testing?
Behat & Codeception PHP’s Solutions
What Laravel has in bag?
class ExampleTest extends TestCase { /** * A basic functional
test example. * @return void */ public function testBasicExample() { $this->visit('/') ->see('Laravel 5') ->dontSee('Rails'); } }
a very clean testing API
a very clean testing API based on PHPUnit
What it’s NOT?
Not a complete test framework
Not a complete test framework Doesn’t run a headless browser
Not a complete test framework Doesn’t run a headless browser
Doesn’t test on real browser
Not a complete test framework Doesn’t run a headless browser
Doesn’t test on real browser Doesn’t test Javascript
Testing Application
public function testPhotoCanBeUploaded() { $this->visit('/upload') ->type('File Name', 'name') ->attach($absolutePathToFile, 'photo')
->press('Upload') ->see('Upload Successful!'); }
Testing JSON API
public function test_create_quotation_with_new_btn() { $id = '897564'; $this->post('/api/v1/quotation',['id' => $id])
->seeJson([ "message" => 'Successfully Created' ]) ->seeInDatabase('quotations',['id' => $id]); }
Migrations and Middlewares
Some useful config
Thanks!!!
fareez_ahamed
[email protected]
www.fareez.info