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
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
610
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
450
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
690
Apache Iceberg V3 and migration to V3
tomtanaka
0
160
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
4
320
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
450
そのAIレビュー、レビューしてますか? / Are you reviewing those AI reviews?
rkaga
6
4.5k
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
270
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
180
例外処理とどう使い分ける?Result型を使ったエラー設計 #burikaigi
kajitack
16
6k
CSC307 Lecture 07
javiergs
PRO
0
550
Rust 製のコードエディタ “Zed” を使ってみた
nearme_tech
PRO
0
160
Featured
See All Featured
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
110
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
110
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
Mobile First: as difficult as doing things right
swwweet
225
10k
Code Review Best Practice
trishagee
74
20k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
110
Prompt Engineering for Job Search
mfonobong
0
160
From π to Pie charts
rasagy
0
120
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
350
We Have a Design System, Now What?
morganepeng
54
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