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
130
Some Modern Tools for Developers
landish
0
150
Introduction to GIT
landish
0
81
Other Decks in Programming
See All in Programming
torikago - Ruby::Boxで照らすモジュラモノリスの実行境界
se4weed
1
390
Laravelで学ぶ Webアプリケーションチューニング入門/web_application_tuning_101
hanhan1978
4
1.9k
楽しそうなつよつよエンジニアと目が死んでる僕/A brilliant engineer having a blast, and dead-eyed me.
3l4l5
2
190
夏だ!祭りだ!祭りとはドメインモデリングでは?
ryugen04
0
320
Go言語とトイモデルで学ぶTransformerの気持ち / fukuokago23-transformer
monochromegane
0
180
ソフトウェアエンジニアにとっての生成AI - 特性を知って使い倒す / generative ai for software enginner
kishida
5
1.9k
【QA Test Talk Vol.8】AI-DLC による Whole Team Approach の加速
pkshadeck
PRO
0
210
freeeにおけるEvalsの実践例の紹介
freee
PRO
0
120
5分で問診!Composer セキュリティ健康診断
codmoninc
0
1.1k
バグを直したら useEffect が消えた
colorful12
3
630
Go 1.27 における memory allocation の高速化
andpad
0
250
これって Effect でできたのでは? / TSKaigi Mashup Kansai #2
susisu
0
250
Featured
See All Featured
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
How to Think Like a Performance Engineer
csswizardry
28
2.7k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
3
1.1k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
201
75k
How STYLIGHT went responsive
nonsquared
100
6.2k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
960
The Language of Interfaces
destraynor
162
27k
GitHub's CSS Performance
jonrohan
1033
470k
The Curse of the Amulet
leimatthew05
2
14k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
210
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.9k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
480
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/>