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
390
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
150
Automatizado rotinas com sua linguagem favorita
abdala
0
120
Presente! Software Livre
abdala
0
82
Other Decks in Programming
See All in Programming
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
1
520
App Storeの外へ──日本のiOSサイドローディング入門 for iOSDC Japan 2026
yuukiw00w
0
290
iOSDC Japan 2026 - Swiftで作って学ぼう!データベース自作入門
kaseken
2
430
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
9.4k
Simple Storage Service(S3) is not simple
iwatsukayura
0
120
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
320
仕様駆動開発による爆速プロダクト開発 / Bakusoku Spec Driven Development
kobakei
0
160
App Intentsのビルドプロセスを支える技術
kntkymt
0
490
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
120
更なる可用性を求めて、5年間運用したKotlinのアプリケーションをGoでリプレイスする話
ken_tunc
0
430
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
830
SONY CISC-NEWS NWS-1750 + NWB-225 フレームバッファの NetBSD/news68k ドライバ実装 / OSC2026Hiroshima
tsutsui
0
160
Featured
See All Featured
Test your architecture with Archunit
thirion
2
2.4k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
Exploring anti-patterns in Rails
aemeredith
4
520
Statistics for Hackers
jakevdp
799
230k
[RailsConf 2023] Rails as a piece of cake
palkan
59
7k
How to Talk to Developers About Accessibility
jct
2
560
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
550
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
780
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
440
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
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