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
88
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
120
Introduction to Ionic Framework
landish
0
83
Some Modern Tools for Developers
landish
0
110
Introduction to GIT
landish
0
46
Other Decks in Programming
See All in Programming
【TID2024】模擬講義:プログラマと一緒にゲームをデザインしてみよう!
akatsukigames_tech
0
670
あなたのアプリ、ログはでてますか?あるいはログをだしてますか? (Funabashi.dev用 軽量版)
uzulla
2
120
2024 컴포즈 정원사
jisungbin
0
150
Regular Expressions, REXML, Automata Learning
makenowjust
0
220
ECMAScript、Web標準の型はどう管理されているか / How ECMAScript and Web standards types are maintained
petamoriken
3
390
大公開!iOS開発の悩みトップ5 〜iOSDC Japan 2024〜
ryunakayama
0
190
Shinjuku.rb#95:心の技術書紹介
free_world21
1
110
Our Websites Need a Lifestyle Change, Not a Diet
ryantownsend
0
150
rbs-inlineを導入してYARDからRBSに移行する
euglena1215
1
290
Rubyのobject_id
qnighy
6
1.3k
メモリ最適化を究める!iOSアプリ開発における5つの重要なポイント
yhirakawa333
0
420
Prompt Cachingは本当に効果的なのか検証してみた.pdf
ttnyt8701
0
530
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
263
13k
Thoughts on Productivity
jonyablonski
66
4.2k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
278
13k
Navigating Team Friction
lara
183
13k
How to Think Like a Performance Engineer
csswizardry
16
960
How to train your dragon (web standard)
notwaldorf
85
5.6k
The Mythical Team-Month
searls
218
43k
Adopting Sorbet at Scale
ufuk
73
8.9k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Optimising Largest Contentful Paint
csswizardry
31
2.8k
GitHub's CSS Performance
jonrohan
1030
450k
Clear Off the Table
cherdarchuk
91
320k
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/>