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
TVerのWeb内製化 - 開発スピードと品質を両立させるまでの道のり
techtver
PRO
1
240
Promise.tryで実現する新しいエラーハンドリング New error handling with Promise try
bicstone
2
420
DartASTとその活用
sotaatos
2
110
AIを駆使して新しい技術を効率的に理解する方法
nogu66
1
610
Kotlin + Power-Assert 言語組み込みならではのAssertion Library採用と運用ベストプラクティス by Kazuki Matsuda/Gen-AX
kazukima
0
110
Private APIの呼び出し方
kishikawakatsumi
3
860
問題の見方を変える「システム思考」超入門
panda_program
0
190
高単価案件で働くための心構え
nullnull
0
130
Web エンジニアが JavaScript で AI Agent を作る / JSConf JP 2025 sponsor session
izumin5210
3
1.1k
Kotlinで実装するCPU/GPU 「協調的」パフォーマンス管理
matuyuhi
0
380
自動テストのアーキテクチャとその理由ー大規模ゲーム開発の場合ー
segadevtech
2
970
イベントストーミングのはじめかた / Getting Started with Event Storming
nrslib
1
380
Featured
See All Featured
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.2k
Scaling GitHub
holman
463
140k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.7k
Fireside Chat
paigeccino
41
3.7k
How to train your dragon (web standard)
notwaldorf
97
6.4k
Context Engineering - Making Every Token Count
addyosmani
9
380
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Java REST API Framework Comparison - PWX 2021
mraible
34
9k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Agile that works and the tools we love
rasmusluckow
331
21k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
34
2.3k
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/>