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
120
0
Share
PHPUnit
landish
May 29, 2015
More Decks by landish
See All by landish
Anatomy Of The Web
landish
1
200
Markdown
landish
0
170
Introduction to Ionic Framework
landish
0
110
Some Modern Tools for Developers
landish
0
140
Introduction to GIT
landish
0
76
Other Decks in Programming
See All in Programming
CLIであることを活かしたGitHub Copilot CLI活用術 / GitHub Copilot CLI Pro Tips & Tricks
nao_mk2
1
1.1k
ビジネスモデルから紐解く、AI+型駆動開発
hirokiomote
2
2.9k
デフォルト運用のCodeRabbit、1年で何が変わったか / How CodeRabbit Changed Our Code Review in 1 Year
bake0937
1
110
Oxcを導入して開発体験が向上した話
yug1224
4
150
Oxlintはいかにしてtsgolintのlint ruleを呼び出しているのか
syumai
2
780
要はバランスからの卒業 #yumemi_grow
kajitack
0
200
ECR拡張スキャンでSBOMを収集して サプライチェーン攻撃の影響調査を 爆速で終わらせてみた
akihisaikeda
2
200
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
7
2.7k
Spec-Driven Development with AI-Agents: From High-Level Requirements to Working Software
antonarhipov
2
370
AIとRubyの静的型付け
ukin0k0
0
140
AlarmKitで明後日起きれるアラームアプリを作る
trickart
0
150
柔軟なPDFレイアウトエディタを支える型システム設計 — Discriminated UnionとConditional Typeの実践
minako__ph
4
820
Featured
See All Featured
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.4k
Become a Pro
speakerdeck
PRO
31
5.9k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
350
The Spectacular Lies of Maps
axbom
PRO
1
770
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
270
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3.2k
Producing Creativity
orderedlist
PRO
348
40k
Visualization
eitanlees
151
17k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
240
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.5k
Building an army of robots
kneath
306
46k
Rails Girls Zürich Keynote
gr2m
96
14k
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/>