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
110
PHPUnit
landish
May 29, 2015
Tweet
Share
More Decks by landish
See All by landish
Anatomy Of The Web
landish
1
190
Markdown
landish
0
160
Introduction to Ionic Framework
landish
0
100
Some Modern Tools for Developers
landish
0
130
Introduction to GIT
landish
0
69
Other Decks in Programming
See All in Programming
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
340
Event Storming
hschwentner
3
1.3k
今更考える「単一責任原則」 / Thinking about the Single Responsibility Principle
tooppoo
3
1.2k
Geminiの機能を調べ尽くしてみた
naruyoshimi
0
190
LangChain4jとは一味違うLangChain4j-CDI
kazumura
1
120
株式会社 Sun terras カンパニーデック
sunterras
0
1.9k
エージェント開発初心者の僕がエージェントを作った話と今後やりたいこと
thasu0123
0
210
Head of Engineeringが現場で回した生産性向上施策 2025→2026
gessy0129
0
200
米国のサイバーセキュリティタイムラインと見る Goの暗号パッケージの進化
tomtwinkle
1
340
atmaCup #23でAIコーディングを活用した話
ml_bear
4
710
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
5
900
JPUG勉強会 OSSデータベースの内部構造を理解しよう
oga5
2
220
Featured
See All Featured
Java REST API Framework Comparison - PWX 2021
mraible
34
9.2k
Navigating Team Friction
lara
192
16k
Believing is Seeing
oripsolob
1
68
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
290
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
620
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
660
Into the Great Unknown - MozCon
thekraken
40
2.3k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
190
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
240
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
1
140
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/>