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
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
煩雑なSkills管理をSoC(関心の分離)により解決する――関心を分離し、プロンプトを部品として育てるためのOSSを作った話 / Solving Complex Skills Management Through SoC (Separation of Concerns)
nrslib
3
410
Symfonyの特性(設計思想)を手軽に活かす特性(trait)
ickx
0
120
生成 AI 時代のスナップショットテストってやつを見せてあげますよ(α版)
ojun9
0
340
ローカルで稼働するAI エージェントを超えて / beyond-local-ai-agents
gawa
1
240
一度始めたらやめられない開発効率向上術 / Findy あなたのdotfilesを教えて!
k0kubun
4
2.8k
10年分の技術的負債、完済へ ― Claude Code主導のAI駆動開発でスポーツブルを丸ごとリプレイスした話
takuya_houshima
0
700
Kubernetes上でAgentを動かすための最新動向と押さえるべき概念まとめ
sotamaki0421
2
390
最初からAWS CDKで技術検証してもいいんじゃない?
akihisaikeda
4
180
Radical Imagining - LIFT 2025-2027 Policy Agenda
lift1998
0
230
PHPで TLSのプロトコルを実装してみる
higaki_program
0
730
Rethinking API Platform Filters
vinceamstoutz
0
8.2k
今年もTECHSCOREブログを書き続けます!
hiraoku101
0
220
Featured
See All Featured
A designer walks into a library…
pauljervisheath
211
24k
Paper Plane
katiecoart
PRO
1
49k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
500
ラッコキーワード サービス紹介資料
rakko
1
2.9M
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
240
Context Engineering - Making Every Token Count
addyosmani
9
790
How Software Deployment tools have changed in the past 20 years
geshan
0
33k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9k
Producing Creativity
orderedlist
PRO
348
40k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
330
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
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/>