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
JLPDevs - Web Application Unit Testing: Strateg...
Search
JLP Community
December 05, 2015
Programming
0
47
JLPDevs - Web Application Unit Testing: Strategy and Tools
JLP Community
December 05, 2015
Tweet
Share
More Decks by JLP Community
See All by JLP Community
JLP Community Profile
jlpcommunity
0
56
JLPDevs - Optimization Tooling for Modern Web App Development
jlpcommunity
3
210
Other Decks in Programming
See All in Programming
CSC307 Lecture 06
javiergs
PRO
0
690
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
190
ぼくの開発環境2026
yuzneri
0
230
AgentCoreとHuman in the Loop
har1101
5
240
ノイジーネイバー問題を解決する 公平なキューイング
occhi
0
100
「ブロックテーマでは再現できない」は本当か?
inc2734
0
1k
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
5
1k
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
140
Basic Architectures
denyspoltorak
0
680
Smart Handoff/Pickup ガイド - Claude Code セッション管理
yukiigarashi
0
140
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
1
970
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
380
Featured
See All Featured
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.1k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.9k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
50
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
68
My Coaching Mixtape
mlcsv
0
48
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
370
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
120
4 Signs Your Business is Dying
shpigford
187
22k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
6.9k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
96
Transcript
Web Application Unit Testing: Strategy and Tools Presented by: Salman
El Farisi 05 Desember 2015 @ code margonda
Let's Move On Runnable Code Testable Code
Not So Testable Code
Better Version
Better Version (2)
Testing Pyramid
Web Application Unit Testing Challenge: Too much dependency Network
(HTTP Request) Database Third Party Library File System (upload / download file) Tools: PHPUnit (Unit testing framework) Mockery (Mock Object) Faker (Fake Object) PHP-DI / Pimple (Dependency Injection Library)
Mockery
Faker
Web Application Unit Testing (2)
Web Application Unit Testing (3)
Web Application Unit Testing (3) Assertion: Compare expected and actual
value AssertTrue() AssertNotNull() AssertEquals() AssertArrayHasKey() AssertClassHasAttribute() Etc. https://phpunit.de/manual/current/en/phpunit-book.html#appendixes.assertions
Mock Object RoleController.php Connect to database
Mock Object (2) RoleControllerTest.php Control the 'Role' class behaviour so
it wont touch the database
Fake Object Create fake object
Thank You :)