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, ele irá te salvar!
Search
Abdala Cerqueira
April 26, 2012
Programming
110
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
PHPUnit, ele irá te salvar!
Palestra realizado no FLISOL de Patos-PB
Abdala Cerqueira
April 26, 2012
More Decks by Abdala Cerqueira
See All by Abdala Cerqueira
Docker: multi-stage and multi-environment
abdala
3
740
Docker: multi-stage multi-environment
abdala
0
400
Programação também é mágica
abdala
0
180
Websockets e você, tudo a ver
abdala
1
140
PHP em todos os lugares
abdala
1
160
Automatizado rotinas com sua linguagem favorita
abdala
0
120
Presente! Software Livre
abdala
0
87
Other Decks in Programming
See All in Programming
AmebaブログはKMPから卒業します
kmars0605
0
310
ChromeでローカルLLM
ryu1013
0
180
조합이폭발하는디자인시스템이걸눈으로도테스트하라고요
giljongyu
0
660
R8 の設定見直しでアプリサイズ削減
andpad
0
240
JIS keyboard support in Omarchy
lef237
0
170
PumaからFalconに移行したRailsアプリケーションでの実践
falcon8823
0
310
気持ちぃ〜角丸 Squircle
ryu1013
0
370
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Kaigi on Rails 2026, Tokyo, Japan
marcoroth
2
370
3回つくってわかった、 定期実行ジョブ基盤の本質情報
takai
4
3.5k
Performance Optimization With LLMs
xleitix
0
230
全ての永続トークンを、生まれる前に消し去りたい!
sylph01
2
1.6k
SODA - FACT BOOK(EN)
sodainc
1
190
Featured
See All Featured
Marketing to machines
jonoalderson
1
5.9k
Six Lessons from altMBA
skipperchong
29
4.5k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.9k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
The Language of Interfaces
destraynor
162
27k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Visualization
eitanlees
153
17k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
2
420
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
340
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
540
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
660
Transcript
PHPUNIT Ele irá te salvar
ABDALA CERQUEIRA • Programador • Patinador • Pai
AGENDA • Níveis de teste • PHPUnit • Exemplos
NÍVEIS DE TESTE • Teste de unidade • Teste de
integração • Teste de sistema
TESTE DE UNIDADE • Verifica se o comportamento é o
esperado • Testa pequenas partes de código isoladas das suas dependências • Não acessa recursos externos (filesystem, banco etc.) • Pode ser criado em qualquer etapa • Não interfere no seu código-fonte
PHPUNIT • Portado do JUnit por Sebastian Bergmann • Instalação
feita via PEAR pear config-set auto_discover 1 pear install pear.phpunit.de/PHPUnit • Não se limita a testes unitários DbUnit, Selenium, Story etc.
PHPUNIT • Várias afirmações(asserts) pré-definidas http://www.phpunit.de/manual/3.7/en/writing-tests-for-phpunit.html#writing-tests-for-phpunit.assertions • Dependência entre testes
@depends • Provedores de dados @dataProvider • Teste de exceções @expectedException • Imitação de objetos (Stub e Mock)
PHPUNIT • Documentação ágil --testdox • Cobertura de código --coverage-html
EXEMPLOS Vamos testar?
FIM • Site: • E-mail: • Twitter: • Github !
! http://abda.la
[email protected]
@abdalac http://github.com/abdala