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
110
Some Modern Tools for Developers
landish
0
130
Introduction to GIT
landish
0
70
Other Decks in Programming
See All in Programming
Takumiから考えるSecurity_Maturity_Model.pdf
gessy0129
1
150
Ruby and LLM Ecosystem 2nd
koic
1
1k
OTP を自動で入力する裏技
megabitsenmzq
0
120
AHC061解説
shun_pi
0
400
grapheme_strrev関数が採択されました(あと雑感)
youkidearitai
PRO
1
240
AI時代の脳疲弊と向き合う ~言語学としてのPHP~
sakuraikotone
1
570
[SF Ruby Feb'26] The Silicon Heel
palkan
0
110
AWS Infrastructure as Code の新機能 2025 総まとめ 〜SA 4人による怒涛のデモ祭り〜
konokenj
10
3.4k
new(1.26) ← これすき / kamakura.go #8
utgwkk
0
2.5k
The free-lunch guide to idea circularity
hollycummins
0
270
[PHPerKaigi 2026]PHPerKaigi2025の企画CodeGolfが最高すぎて社内で内製して半年運営して得た内製と運営の知見
ikezoemakoto
0
160
AI時代のシステム設計:ドメインモデルで変更しやすさを守る設計戦略
masuda220
PRO
6
1.1k
Featured
See All Featured
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Being A Developer After 40
akosma
91
590k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
200
Designing for humans not robots
tammielis
254
26k
Site-Speed That Sticks
csswizardry
13
1.1k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
67
37k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.4k
What does AI have to do with Human Rights?
axbom
PRO
1
2k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.5k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Done Done
chrislema
186
16k
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/>