Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
PHPUnit
Search
landish
May 29, 2015
Programming
130
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
190
Introduction to Ionic Framework
landish
0
140
Some Modern Tools for Developers
landish
0
150
Introduction to GIT
landish
0
85
Other Decks in Programming
See All in Programming
Verilogで学ぶCPU自作入門.pdf
uyuki234
6
3.1k
JPUG勉強会 OSSデータベースの内部構造を理解しよう(第2回)
oga5
0
270
XP祭りでしか伝わらないフリップネタ #xpjug
murabayashi
0
150
巨大モノリシックアプリ モダン化大作戦
ktcryomm
1
1.1k
Java 27新機能 / Java 27 new features
kishida
2
170
Workers Cache を知る
syumai
0
240
モジュールの視点からSwiftを読み解く #iosdc
s_shimotori
0
190
ゲームコントローラやキーボードのファームウェアをSwiftで書く
kishikawakatsumi
1
250
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
540
The Rails Doctrine Decade
koic
2
370
『寄り添うラジオ』をAIで作る 体験価値から逆算した、会話しないUXと品質設計
theoriatec2024
3
190
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
290
Featured
See All Featured
Making Projects Easy
brettharned
120
6.8k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
Product Roadmaps are Hard
iamctodd
55
13k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.3k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
250
Darren the Foodie - Storyboard
khoart
PRO
4
3.9k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
410
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
240
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
540
Are puppies a ranking factor?
jonoalderson
2
3.9k
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/>