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
98
PHPUnit
landish
May 29, 2015
Tweet
Share
More Decks by landish
See All by landish
Anatomy Of The Web
landish
1
180
Markdown
landish
0
150
Introduction to Ionic Framework
landish
0
90
Some Modern Tools for Developers
landish
0
130
Introduction to GIT
landish
0
54
Other Decks in Programming
See All in Programming
コーディングは技術者(エンジニア)の嗜みでして / Learning the System Development Mindset from Rock Lady
mackey0225
2
590
私の後悔をAWS DMSで解決した話
hiramax
4
160
レガシープロジェクトで最大限AIの恩恵を受けられるようClaude Codeを利用する
tk1351
3
1.4k
KessokuでDIでもgoroutineを活用する / Go Connect #6
mazrean
0
120
A Gopher's Guide to Vibe Coding
danicat
0
180
Jakarta EE Core Profile and Helidon - Speed, Simplicity, and AI Integration
ivargrimstad
0
220
エンジニアのための”最低限いい感じ”デザイン入門
shunshobon
0
130
物語を動かす行動"量" #エンジニアニメ
konifar
14
5.5k
Understanding Ruby Grammar Through Conflicts
yui_knk
1
140
The State of Fluid (2025)
s2b
0
200
Microsoft Orleans, Daprのアクターモデルを使い効率的に開発、デプロイを行うためのSekibanの試行錯誤 / Sekiban: Exploring Efficient Development and Deployment with Microsoft Orleans and Dapr Actor Models
tomohisa
0
220
Honoアップデート 2025年夏
yusukebe
1
870
Featured
See All Featured
The Cost Of JavaScript in 2023
addyosmani
53
8.8k
Navigating Team Friction
lara
189
15k
Statistics for Hackers
jakevdp
799
220k
We Have a Design System, Now What?
morganepeng
53
7.8k
Designing for humans not robots
tammielis
253
25k
Optimizing for Happiness
mojombo
379
70k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
For a Future-Friendly Web
brad_frost
179
9.9k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.6k
The Invisible Side of Design
smashingmag
301
51k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
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/>