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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
landish
May 29, 2015
Programming
120
0
Share
PHPUnit
landish
May 29, 2015
More Decks by landish
See All by landish
Anatomy Of The Web
landish
1
190
Markdown
landish
0
170
Introduction to Ionic Framework
landish
0
110
Some Modern Tools for Developers
landish
0
140
Introduction to GIT
landish
0
73
Other Decks in Programming
See All in Programming
AWS re:Invent 2025の少し振り返り + DevOps AgentとBacklogを連携させてみた
satoshi256kbyte
3
160
forteeの改修から振り返るPHPerKaigi 2026
muno92
PRO
3
290
2026_04_15_量子計算をパズルとして解く
hideakitakechi
0
110
PicoRuby for IoT: Connecting to the Cloud with MQTT
yuuu
2
570
年間50登壇、単著出版、雑誌寄稿、Podcast出演、YouTube、CM、カンファレンス主催……全部やってみたので面白さ等を比較してみよう / I’ve tried them all, so let’s compare how interesting they are.
nrslib
4
790
Cache-moi si tu peux : patterns et pièges du cache en production - Devoxx France 2026 - Conférence
slecache
0
240
JAWS-UG横浜 #100 祝・第100回スペシャルAWS は VPC レスの時代へ
maroon1st
0
150
実践CRDT
tamadeveloper
0
570
Kubernetes上でAgentを動かすための最新動向と押さえるべき概念まとめ
sotamaki0421
3
510
ハーネスエンジニアリングにどう向き合うか 〜ルールファイルを超えて開発プロセスを設計する〜 / How to approach harness engineering
rkaga
23
13k
PCOVから学ぶコードカバレッジ #phpcon_odawara
o0h
PRO
0
270
(Re)make Regexp in Ruby: Democratizing internals for the JIT
makenowjust
2
180
Featured
See All Featured
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
110k
First, design no harm
axbom
PRO
2
1.2k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.2k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.7k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
720
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.2k
[SF Ruby Conf 2025] Rails X
palkan
2
960
Large-scale JavaScript Application Architecture
addyosmani
515
110k
We Have a Design System, Now What?
morganepeng
55
8.1k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
420
Odyssey Design
rkendrick25
PRO
2
580
Git: the NoSQL Database
bkeepers
PRO
432
67k
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/>