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
180
Markdown
landish
0
160
Introduction to Ionic Framework
landish
0
96
Some Modern Tools for Developers
landish
0
130
Introduction to GIT
landish
0
59
Other Decks in Programming
See All in Programming
SidekiqでAIに商品説明を生成させてみた
akinko_0915
0
130
CSC509 Lecture 10
javiergs
PRO
0
170
Web エンジニアが JavaScript で AI Agent を作る / JSConf JP 2025 sponsor session
izumin5210
3
1.1k
自動テストのアーキテクチャとその理由ー大規模ゲーム開発の場合ー
segadevtech
2
970
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
460
Bakuraku E2E Scenario Test System Architecture #bakuraku_qa_study
teyamagu
PRO
0
710
flutter_kaigi_2025.pdf
kyoheig3
1
270
AIを駆使して新しい技術を効率的に理解する方法
nogu66
1
610
MCPサーバー「モディフィウス」で変更容易性の向上をスケールする / modifius
minodriven
8
1.4k
高単価案件で働くための心構え
nullnull
0
130
Designing Repeatable Edits: The Architecture of . in Vim
satorunooshie
0
310
オンデバイスAIとXcode
ryodeveloper
0
470
Featured
See All Featured
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
2.9k
Mobile First: as difficult as doing things right
swwweet
225
10k
The Language of Interfaces
destraynor
162
25k
Testing 201, or: Great Expectations
jmmastey
46
7.8k
The World Runs on Bad Software
bkeepers
PRO
72
12k
The Cost Of JavaScript in 2023
addyosmani
55
9.2k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
Building an army of robots
kneath
306
46k
The Invisible Side of Design
smashingmag
302
51k
Speed Design
sergeychernyshev
32
1.2k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
31
2.7k
Being A Developer After 40
akosma
91
590k
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/>