Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
98
Some Modern Tools for Developers
landish
0
130
Introduction to GIT
landish
0
63
Other Decks in Programming
See All in Programming
AtCoder Conference 2025「LLM時代のAHC」
imjk
2
470
Rediscover the Console - SymfonyCon Amsterdam 2025
chalasr
2
160
Go コードベースの構成と AI コンテキスト定義
andpad
0
120
まだ間に合う!Claude Code元年をふりかえる
nogu66
5
820
令和最新版Android Studioで化石デバイス向けアプリを作る
arkw
0
400
AIの誤りが許されない業務システムにおいて“信頼されるAI” を目指す / building-trusted-ai-systems
yuya4
6
3.4k
WebRTC、 綺麗に見るか滑らかに見るか
sublimer
1
160
ゲームの物理 剛体編
fadis
0
340
TestingOsaka6_Ozono
o3
0
150
AIエージェントを活かすPM術 AI駆動開発の現場から
gyuta
0
410
実はマルチモーダルだった。ブラウザの組み込みAI🧠でWebの未来を感じてみよう #jsfes #gemini
n0bisuke2
2
990
Giselleで作るAI QAアシスタント 〜 Pull Requestレビューに継続的QAを
codenote
0
180
Featured
See All Featured
[SF Ruby Conf 2025] Rails X
palkan
0
510
Navigating Team Friction
lara
191
16k
Why Our Code Smells
bkeepers
PRO
340
57k
Mobile First: as difficult as doing things right
swwweet
225
10k
GraphQLの誤解/rethinking-graphql
sonatard
73
11k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.6k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
710
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.1k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
We Have a Design System, Now What?
morganepeng
54
7.9k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.6k
The Pragmatic Product Professional
lauravandoore
37
7.1k
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/>