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
66
Other Decks in Programming
See All in Programming
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
4
240
Implementation Patterns
denyspoltorak
0
280
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
180
[KNOTS 2026登壇資料]AIで拡張‧交差する プロダクト開発のプロセス および携わるメンバーの役割
hisatake
0
240
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
120
Data-Centric Kaggle
isax1015
2
760
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
5
990
AgentCoreとHuman in the Loop
har1101
5
220
Fluid Templating in TYPO3 14
s2b
0
130
登壇資料を作る時に意識していること #登壇資料_findy
konifar
3
780
Kotlin Multiplatform Meetup - Compose Multiplatform 외부 의존성 아키텍처 설계부터 운영까지
wisemuji
0
190
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
4.3k
Featured
See All Featured
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
72
AI: The stuff that nobody shows you
jnunemaker
PRO
2
240
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
150
Facilitating Awesome Meetings
lara
57
6.7k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
80
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.3k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
110
Technical Leadership for Architectural Decision Making
baasie
1
240
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
89
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
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/>