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
Approachable Testing with PHPUnit and Laravel
Search
Nathan Morgan
February 15, 2018
Programming
0
290
Approachable Testing with PHPUnit and Laravel
GIFS + Resource Links
Nathan Morgan
February 15, 2018
Tweet
Share
Other Decks in Programming
See All in Programming
Python札幌 LT資料
t3tra
7
1.1k
愛される翻訳の秘訣
kishikawakatsumi
3
360
C-Shared Buildで突破するAI Agent バックテストの壁
po3rin
0
420
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
5
1.5k
안드로이드 9년차 개발자, 프론트엔드 주니어로 커리어 리셋하기
maryang
1
150
【卒業研究】会話ログ分析によるユーザーごとの関心に応じた話題提案手法
momok47
0
150
20251212 AI 時代的 Legacy Code 營救術 2025 WebConf
mouson
0
230
モデル駆動設計をやってみようワークショップ開催報告(Modeling Forum2025) / model driven design workshop report
haru860
0
290
はじめてのカスタムエージェント【GitHub Copilot Agent Mode編】
satoshi256kbyte
0
130
Rubyで鍛える仕組み化プロヂュース力
muryoimpl
0
250
Flutter On-device AI로 완성하는 오프라인 앱, 박제창 @DevFest INCHEON 2025
itsmedreamwalker
1
170
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
210
Featured
See All Featured
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.1k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
170
Are puppies a ranking factor?
jonoalderson
0
2.5k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
1
880
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
53
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.3k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.3k
Navigating Team Friction
lara
191
16k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
1
1.3k
Paper Plane
katiecoart
PRO
0
44k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
990
Building Flexible Design Systems
yeseniaperezcruz
330
39k
Transcript
Approachable Testing with PHPUnit and Laravel 1
What would make tests unapproachable? 2
What would make tests approachable? 4 Fun to write 4
Easy to write 4 Easy to maintain 4 Fast 4 Provide confidence 4 Allow for refactorability 3
What we'll be using? 4 PHPUnit 4 Laravel 5.5 4
Atom PHPUnit Package 4
Getting Setup for Testing 5
6
7
8
9
10
phpunit --group integration 11
12
13
Productivity Tips 14
Aliases 15
16
Snippets + Shortcuts 17
GIF: Snippets + Shortcuts 18
PHPUnit Package 19
GIF: PHPUnit Package: Failing Test 20
GIF: PHPUnit Package: Passing Test 21
PHPUnit Package 4 Atom 4 https://github.com/fuelingtheweb/atom-phpunit/ tree/develop 4 https://github.com/Synapse791/atom-phpunit 22
PHPUnit Package 4 Sublime Text 4 https://github.com/adamwathan/sublime-phpunit 4 PhpStorm 4
https://laravel-news.com/phpunit-phpstorm 23
Feature Test Workflow Borrowing a Book 24
art make:test BorrowingBooksTest 25
26
27
28
29
30
31
32
33
art make:model Book -m 34
art make:factory BookFactory -m Book 35
36
37
38
39
art make:controller LoansController -r 40
41
42
43
art make:model Loan -m 44
45
46
47
48
49
50
51
Unit Test Workflow Creating a Loan 52
53
$user->borrow($book); 54
$book->borrowBy($user); $book->loanTo($user); 55
Loan::fromBook($book)->to($user); 56
art make:test --unit LoanTest 57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
Other Resources 4 Laracasts Testing Tutorials 4 Let's Build A
Forum with Laravel and TDD 4 Testing Laravel 4 $15/month for full access or $350 one time 78
Other Resources 4 Test Driven Laravel: Video Course by Adam
Wathan 4 $149 sale price until Feb. 16 ($100 off) 4 Rails Conf 2013 The Magic Tricks of Testing by Sandi Metz 79