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
0
99
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
92
Some Modern Tools for Developers
landish
0
130
Introduction to GIT
landish
0
55
Other Decks in Programming
See All in Programming
スキーマ駆動で、Zod OpenAPI Honoによる、API開発するために、Hono Takibiというライブラリを作っている
nakita628
0
320
CSC509 Lecture 07
javiergs
PRO
0
240
Devvox Belgium - Agentic AI Patterns
kdubois
1
140
ALL CODE BASE ARE BELONG TO STUDY
uzulla
27
6.7k
釣り地図SNSにおける有料機能の実装
nokonoko1203
0
200
Flutterで分数(Fraction)を表示する方法
koukimiura
0
140
品質ワークショップをやってみた
nealle
0
630
kiroとCodexで最高のSpec駆動開発を!!数時間で web3ネイティブなミニゲームを作ってみたよ!
mashharuki
0
900
Building, Deploying, and Monitoring Ruby Web Applications with Falcon (Kaigi on Rails 2025)
ioquatix
4
2.5k
monorepo の Go テストをはやくした〜い!~最小の依存解決への道のり~ / faster-testing-of-monorepos
convto
2
530
Migration to Signals, Resource API, and NgRx Signal Store
manfredsteyer
PRO
0
110
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
460
Featured
See All Featured
The Language of Interfaces
destraynor
162
25k
Practical Orchestrator
shlominoach
190
11k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.1k
What's in a price? How to price your products and services
michaelherold
246
12k
Stop Working from a Prison Cell
hatefulcrawdad
272
21k
Building a Scalable Design System with Sketch
lauravandoore
463
33k
Making the Leap to Tech Lead
cromwellryan
135
9.6k
We Have a Design System, Now What?
morganepeng
53
7.8k
Thoughts on Productivity
jonyablonski
70
4.9k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
657
61k
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/>