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
pnpm に provenance のダウングレード を検出する PR を出してみた
ryo_manba
1
160
AkarengaLT vol.38
hashimoto_kei
1
120
オープンソースソフトウェアへの解像度🔬
utam0k
17
3.1k
Leading Effective Engineering Teams in the AI Era
addyosmani
7
640
フロントエンド開発のためのブラウザ組み込みAI入門
masashi
7
3.6k
Cursorハンズオン実践!
eltociear
2
1.2k
なんでRustの環境構築してないのにRust製のツールが動くの? / Why Do Rust-Based Tools Run Without a Rust Environment?
ssssota
14
46k
CSC509 Lecture 06
javiergs
PRO
0
270
PHPに関数型の魂を宿す〜PHP 8.5 で実現する堅牢なコードとは〜 #phpcon_hiroshima / phpcon-hiroshima-2025
shogogg
1
340
CSC509 Lecture 07
javiergs
PRO
0
250
AI駆動で0→1をやって見えた光と伸びしろ
passion0102
1
850
Introduce Hono CLI
yusukebe
6
3.1k
Featured
See All Featured
Docker and Python
trallard
46
3.6k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4k
Designing for Performance
lara
610
69k
Art, The Web, and Tiny UX
lynnandtonic
303
21k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.2k
Six Lessons from altMBA
skipperchong
29
4k
Practical Orchestrator
shlominoach
190
11k
Bash Introduction
62gerente
615
210k
Music & Morning Musume
bryan
46
6.9k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
23
1.5k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
14k
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