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
170
Introduction to Ionic Framework
landish
0
110
Some Modern Tools for Developers
landish
0
140
Introduction to GIT
landish
0
78
Other Decks in Programming
See All in Programming
不変条件と整合性境界—ビジネスが決める設計判断と実現パターン / Invariants and Consistency Boundaries
nrslib
13
3.5k
運用エージェントは "作る" から "育てる" へ - 記憶と自己進化の3層設計パターン / self-evolving-agents-three-layer-agent-design
gawa
12
3.5k
Stage 3 Decorators でできること / できないこと / TSKaigi 2026
susisu
1
1.6k
Signal Forms: Beyond the Basics @ngBaguette 2026 in Paris
manfredsteyer
PRO
0
230
AI駆動開発勉強会 広島支部 第一回勉強会 AI駆動開発概要とワークショップ
hayatoshimiu
0
450
代数的データ型って何が嬉しいの? #frontend_phpcon_do
kajitack
8
3.2k
関係性から理解する"同一性"の型用語たち
pvcresin
2
640
ローカルLLMを使ってB2Bサービスを作っていての学び
yaotti
0
140
ADKを使って簡単にAIエージェントを作ってみよう
k1mu21
0
230
AIとASP.NET Coreで雑Webアプリを作った話
mayuki
0
370
New "Type" system on PicoRuby
pocke
1
480
Datadog × OpenTelemetry 入門と実践のあいだ
kn_to_maxpno
1
150
Featured
See All Featured
Side Projects
sachag
455
43k
Bash Introduction
62gerente
615
210k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.5k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
400
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
380
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
160
Google's AI Overviews - The New Search
badams
0
1k
BBQ
matthewcrist
89
10k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
350
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
160
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.7k
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/>