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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
110
Some Modern Tools for Developers
landish
0
130
Introduction to GIT
landish
0
70
Other Decks in Programming
See All in Programming
エラーログのマスキングの仕組みづくりに役立ったASTの話
kumoichi
0
220
守る「だけ」の優しいEMを抜けて、 事業とチームを両方見る視点を身につけた話
maroon8021
3
970
オブザーバビリティ駆動開発って実際どうなの?
yohfee
3
850
エージェント開発初心者の僕がエージェントを作った話と今後やりたいこと
thasu0123
0
250
ふつうの Rubyist、ちいさなデバイス、大きな一年
bash0c7
0
960
Everything Claude Code OSS詳細 — 5層構造の中身と導入方法
targe
0
110
AI駆動開発の本音 〜Claude Code並列開発で見えたエンジニアの新しい役割〜
hisuzuya
4
510
Takumiから考えるSecurity_Maturity_Model.pdf
gessy0129
1
140
Angular-Apps smarter machen mit Gen AI: Lokal und offlinefähig - Hands-on Workshop!
christianliebel
PRO
0
110
CSC307 Lecture 15
javiergs
PRO
0
250
Codexに役割を持たせる 他のAIエージェントと組み合わせる実務Tips
o8n
4
1.3k
SourceGeneratorのマーカー属性問題について
htkym
0
200
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
Context Engineering - Making Every Token Count
addyosmani
9
750
Producing Creativity
orderedlist
PRO
348
40k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
550
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.2k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
87
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
970
Rebuilding a faster, lazier Slack
samanthasiow
85
9.4k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
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/>