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
93
PHPUnit
landish
May 29, 2015
Tweet
Share
More Decks by landish
See All by landish
Anatomy Of The Web
landish
1
170
Markdown
landish
0
140
Introduction to Ionic Framework
landish
0
84
Some Modern Tools for Developers
landish
0
120
Introduction to GIT
landish
0
50
Other Decks in Programming
See All in Programming
エンジニアが挑む、限界までの越境
nealle
1
310
Thank you <💅>, What's the Next?
ahoxa
1
590
Empowering Developers with HTML-Aware ERB Tooling @ RubyKaigi 2025, Matsuyama, Ehime
marcoroth
2
960
Fiber Scheduler vs. General-Purpose Parallel Client
hayaokimura
1
290
インプロセスQAにおいて大事にしていること / In-process QA Meetup
medley
0
140
Serving TUIs over SSH with Go
caarlos0
0
570
flutter_kaigi_mini_4.pdf
nobu74658
0
140
UMAPをざっくりと理解 / Overview of UMAP
kaityo256
PRO
3
1.4k
Cursorを活用したAIプログラミングについて 入門
rect
0
160
個人開発の学生アプリが企業譲渡されるまで
akidon0000
2
1.2k
Deoptimization: How YJIT Speeds Up Ruby by Slowing Down / RubyKaigi 2025
k0kubun
2
1.9k
プロダクトエンジニアのしごと 〜 受託 × 高難度を乗り越えるOptium開発 〜
algoartis
0
160
Featured
See All Featured
Making Projects Easy
brettharned
116
6.2k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.2k
Six Lessons from altMBA
skipperchong
28
3.7k
Gamification - CAS2011
davidbonilla
81
5.3k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.3k
Bash Introduction
62gerente
612
210k
Building Applications with DynamoDB
mza
94
6.4k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2k
GraphQLとの向き合い方2022年版
quramy
46
14k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.2k
Designing Experiences People Love
moore
142
24k
A better future with KSS
kneath
239
17k
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/>