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
190
Markdown
landish
0
160
Introduction to Ionic Framework
landish
0
100
Some Modern Tools for Developers
landish
0
130
Introduction to GIT
landish
0
66
Other Decks in Programming
See All in Programming
Graviton と Nitro と私
maroon1st
0
160
2年のAppleウォレットパス開発の振り返り
muno92
PRO
0
180
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
7
2.1k
DevFest Android in Korea 2025 - 개발자 커뮤니티를 통해 얻는 가치
wisemuji
0
180
公共交通オープンデータ × モバイルUX 複雑な運行情報を 『直感』に変換する技術
tinykitten
PRO
0
180
TerraformとStrands AgentsでAmazon Bedrock AgentCoreのSSO認証付きエージェントを量産しよう!
neruneruo
4
2.4k
Cap'n Webについて
yusukebe
0
160
dchart: charts from deck markup
ajstarks
3
960
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
0
460
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
360
CSC307 Lecture 04
javiergs
PRO
0
630
AI時代を生き抜く 新卒エンジニアの生きる道
coconala_engineer
1
520
Featured
See All Featured
A Tale of Four Properties
chriscoyier
162
24k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
1
50
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
1
36
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.6k
Raft: Consensus for Rubyists
vanstee
141
7.3k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
170
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
100
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
140
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
Ethics towards AI in product and experience design
skipperchong
1
170
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
280
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/>