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
PHPUnit
Search
landish
May 29, 2015
Programming
0
93
PHPUnit
landish
May 29, 2015
Tweet
Share
More Decks by landish
See All by landish
Anatomy Of The Web
landish
1
170
Markdown
landish
0
130
Introduction to Ionic Framework
landish
0
84
Some Modern Tools for Developers
landish
0
120
Introduction to GIT
landish
0
50
Other Decks in Programming
See All in Programming
Unlock the Potential of Swift Code Generation
rockname
0
240
コンテナでLambdaをデプロイするときに知っておきたかったこと
_takahash
0
180
CRE Meetup!ユーザー信頼性を支えるエンジニアリング実践例の発表資料です
tmnb
0
630
List とは何か? / PHPerKaigi 2025
meihei3
0
710
Kamal 2 – Get Out of the Cloud
aleksandrov
1
180
AI Coding Agent Enablement - エージェントを自走させよう
yukukotani
13
5.8k
アプリを起動せずにアプリを開発して品質と生産性を上げる
ishkawa
0
2.6k
Building a macOS screen saver with Kotlin (Android Makers 2025)
zsmb
1
140
Vibe Codingをせずに Clineを使っている
watany
17
6.1k
AI時代の開発者評価について
ayumuu
0
110
[NG India] Event-Based State Management with NgRx SignalStore
markostanimirovic
1
110
サービスクラスのありがたみを発見したときの思い出 #phpcon_odawara
77web
4
630
Featured
See All Featured
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.7k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Adopting Sorbet at Scale
ufuk
76
9.3k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Music & Morning Musume
bryan
47
6.5k
How to train your dragon (web standard)
notwaldorf
91
6k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
The Cult of Friendly URLs
andyhume
78
6.3k
Faster Mobile Websites
deanohume
306
31k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
650
Transcript
Unit Testing With PHPUnit https://phpunit.de/
Test, that the code you wrote, actually works. Concept
Why? • Code Quality • Changes Does Not Break Anything
• Easy Contribution • Speed Up Development • Continuous Integration • Sleep At Night
Testing In Browser
Installation Old Way New (Modern) Way https://phpunit.de/manual/current/en/installation.html
Configuration - phpunit.xml(.dist) https://phpunit.de/manual/current/en/appendixes.configuration.html
File Structure |--src/ |----Example.php |--tests/ |----ExampleTest.php |--phpunit.xml
Example Test Case <?php class ExampleTest extends PHPUnit_Framework_TestCase { //
… public function testExample() { // … } // … }
https://phpunit.de/manual/current/en/appendixes.assertions.html Assertions
https://phpunit.de/manual/current/en/appendixes.annotations.html @Annotations
Test CLI
PHPUnit with PHPStorm
https://github.com/Landish/Pagination Showcase
<Live Code/>