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
“いい感じ“な定量評価を求めて - Four Keysとアウトカムの間の探求 -
nealle
2
11k
What's new in AppKit on macOS 26
1024jp
0
150
技術同人誌をMCP Serverにしてみた
74th
1
680
「App Intent」よくわからんけどすごい!
rinngo0302
1
100
フロントエンドのパフォーマンスチューニング
koukimiura
5
1.9k
新メンバーも今日から大活躍!SREが支えるスケールし続ける組織のオンボーディング
honmarkhunt
5
8.4k
ペアプロ × 生成AI 現場での実践と課題について / generative-ai-in-pair-programming
codmoninc
2
21k
AIともっと楽するE2Eテスト
myohei
8
2.9k
Google Agent Development Kit でLINE Botを作ってみた
ymd65536
2
260
PHPでWebSocketサーバーを実装しよう2025
kubotak
0
310
The Niche of CDK Grant オブジェクトって何者?/the-niche-of-cdk-what-isgrant-object
hassaku63
1
570
dbt民主化とLLMによる開発ブースト ~ AI Readyな分析サイクルを目指して ~
yoshyum
3
1.1k
Featured
See All Featured
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.7k
The Cult of Friendly URLs
andyhume
79
6.5k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.6k
Mobile First: as difficult as doing things right
swwweet
223
9.7k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
Being A Developer After 40
akosma
90
590k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
BBQ
matthewcrist
89
9.7k
Typedesign – Prime Four
hannesfritz
42
2.7k
KATA
mclloyd
30
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