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
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
PHPUnit
landish
May 29, 2015
More Decks by landish
See All by landish
Anatomy Of The Web
landish
1
200
Markdown
landish
0
180
Introduction to Ionic Framework
landish
0
110
Some Modern Tools for Developers
landish
0
150
Introduction to GIT
landish
0
80
Other Decks in Programming
See All in Programming
メールのエイリアス機能を履き違えない
isshinfunada
0
230
php-fpmのプロセスが枯渇した日-調査・対処・そして本当にやるべきだったこと-
shibuchaaaan
0
240
ルールを書いて終わらせないハーネスエンジニアリング
yug1224
4
1.9k
VibeCodingからAgenticWorkflowへ
starfish719
0
320
Claude CodeとAgentCore Gatewayを繋ぐ際の認証認可 / Authentication and authorization when connecting Claude Code with AgentCore Gateway
har1101
1
250
Detecting Compromised CI with eBPF and Cilium Tetragon
lizrice
0
160
プロポーザルを書いてもらう
pvcresin
0
280
TSX の <Hoge<Fuga>> という構文に驚いた話 / tsx-type-argument-syntax
kanaru0928
0
210
S3 を使うアプリケーションをローカル完結で動かすことに全力を注いでみた / Running S3 Apps Offline
contour_gara
0
390
霧の中の代数的エフェクト
funnyycat
1
490
属人化した知識を、 AIが辿れる地図にする
pkshadeck
PRO
1
150
源内ハンズオン概要編
hideg
0
130
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
141
7.6k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2.1k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
200
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
690
GraphQLとの向き合い方2022年版
quramy
50
15k
Designing for Timeless Needs
cassininazir
1
430
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
570
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
3
420
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
340
Reality Check: Gamification 10 Years Later
codingconduct
0
2.2k
Accessibility Awareness
sabderemane
1
170
Discover your Explorer Soul
emna__ayadi
2
1.2k
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/>