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
猫と暮らす Google Nest Cam生活🐈 / WebRTC with Google Nest Cam
yutailang0119
0
170
MCPを使ってイベントソーシングのAIコーディングを効率化する / Streamlining Event Sourcing AI Coding with MCP
tomohisa
0
170
#QiitaBash MCPのセキュリティ
ryosukedtomita
1
1.5k
LT 2025-06-30: プロダクトエンジニアの役割
yamamotok
0
870
Claude Code + Container Use と Cursor で作る ローカル並列開発環境のススメ / ccc local dev
kaelaela
12
7.1k
A full stack side project webapp all in Kotlin (KotlinConf 2025)
dankim
0
150
“いい感じ“な定量評価を求めて - Four Keysとアウトカムの間の探求 -
nealle
2
12k
20250704_教育事業におけるアジャイルなデータ基盤構築
hanon52_
5
1.1k
NEWT Backend Evolution
xpromx
1
140
AIともっと楽するE2Eテスト
myohei
8
3k
マッチングアプリにおけるフリックUIで苦労したこと
yuheiito
0
190
チームのテスト力を総合的に鍛えて品質、スピード、レジリエンスを共立させる/Testing approach that improves quality, speed, and resilience
goyoki
5
1.1k
Featured
See All Featured
Building an army of robots
kneath
306
45k
The Cult of Friendly URLs
andyhume
79
6.5k
Code Review Best Practice
trishagee
69
19k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Optimizing for Happiness
mojombo
379
70k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
60k
How STYLIGHT went responsive
nonsquared
100
5.6k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2.2k
Practical Orchestrator
shlominoach
189
11k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
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/>