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
140
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Laravel Integration Testing
Slides of Laravel Integration Testing talk at Laravel Chennai Meetup #3
Fareez Ahamed
January 31, 2016
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
Composerを使ったサプライチェーン攻撃の様子を眺めてみる #phpstudy
o0h
PRO
2
240
代数的データ型って何が嬉しいの? #frontend_phpcon_do
kajitack
8
3.3k
AutonomyとControlのあいだ:Graflowで記述するAIエージェント協調
myui
0
120
The Arts and Crafts of Work in the AI Era — Toward Mastery in Software Development
kuranuki
1
750
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
570
ふつうのFeature Flag実践入門
irof
7
3.7k
Why Laravel apps break—Mastering the fundamentals to keep them maintainable
kentaroutakeda
1
350
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
210
正しくソフトウェアを作る、前提を疑うための認知の視点 / doubt-premise
minodriven
21
6.5k
IBM Bobを活用したレガシーアプリの最新化
oniak3ibm
PRO
1
190
「AIで開発し、AIを届ける」をEvalでつなぐ 〜AIネイティブに始めるプロダクト開発の実践〜 / Connecting "Develop with AI, deliver AI" with Eval
rkaga
4
4.9k
net-httpのHTTP/2対応について
naruse
0
470
Featured
See All Featured
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
280
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
390
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
Heart Work Chapter 1 - Part 1
lfama
PRO
7
36k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
360
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
130
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
610
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
300
We Are The Robots
honzajavorek
0
240
Code Review Best Practice
trishagee
74
20k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.1k
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