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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
landish
May 29, 2015
Programming
120
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
PHPUnit
landish
May 29, 2015
More Decks by landish
See All by landish
Anatomy Of The Web
landish
1
200
Markdown
landish
0
180
Introduction to Ionic Framework
landish
0
140
Some Modern Tools for Developers
landish
0
150
Introduction to GIT
landish
0
83
Other Decks in Programming
See All in Programming
書籍「プロフェッショナルAI駆動開発」紹介スライド
juntaromatsumoto
0
780
Oxlintはいいぞ(続)
yug1224
1
480
引き算の組織 ― アウトカムとAIに全振りするために辞めたこと ― / Organization by Subtraction
hirokiyamamoto14
PRO
0
310
Detecting Compromised CI with eBPF and Cilium Tetragon
lizrice
0
270
go-spidermonkeyでAIエージェントのCode Modeを実装する
syumai
3
1.3k
言葉の格闘技のススメ~紙とペンと言葉から始める、キャリアの描き方~
progresscicada
2
190
Go 1.27からのGODEBUG / Go 1.27 リリースパーティ #go127party
mazrean
0
250
Discordを用いたラボオートメーション関連情報収集の自動化
noguhiro2002
0
460
Hono + Inertia + React で LP を構築した話
oukayuka
2
180
ドリフトを絶対に許さない(?)CDK運用 / CDK Ops with Zero Tolerance for Drifts (?)
akihisaikeda
1
240
仕様駆動開発へのトライを機に チームに適合する手法を模索し続けている話
freee
PRO
0
650
片田舎のおっさん、 Swift Buildのダイアモンド問題解決の不具合修正PRを出すが、解決方法がキャッシュをしないようにすることであり、ビルド時間が伸びると言われてマージされないので高速化もする/swiftbuild
yimajo
0
310
Featured
See All Featured
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
220
Are puppies a ranking factor?
jonoalderson
2
3.8k
How to train your dragon (web standard)
notwaldorf
97
6.8k
We Are The Robots
honzajavorek
0
310
Believing is Seeing
oripsolob
1
200
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.6k
Technical Leadership for Architectural Decision Making
baasie
3
540
Making the Leap to Tech Lead
cromwellryan
135
10k
Evolving SEO for Evolving Search Engines
ryanjones
0
270
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.5k
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/>