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
AI が書く Go コードの品質を劇的に向上させる Linter: “declscope”
mpyw
0
480
phperだってパンチカードでコーディングしたい
o0h
PRO
0
200
Streamlitで実現する自然言語データアプリ開発
ayumu_yamaguchi
1
340
見えないものを探る要求要件定義に必要な基本的思考 / invisible-requirement-thinking
minodriven
13
6.6k
モバイル交通系ICへのチャージ実例から考える、クロスプラットフォーム開発におけるiOS実機テスト設計とCI運用
yusuga
1
580
半永久的に提供し続けられるプライベートクラウドを目指して ― 利用者の認知負荷を抑えるAPI抽象化とハードウェア世代交代の基盤設計
tomokon
0
440
RAG の “R” を Swift で覗いてみる 〜「意味から探す」検索の仕組み〜
nao_randd
0
120
Security issues being discussed on Web Platforms
petamoriken
0
1.4k
Embedded Swiftで作る自作USBデバイス によるiOSデバイスの自動テスト / iOSDC Japan 2026 glassfiber
glassfiber
0
290
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
350
テストを司るデーモンに会いに行く 〜隔離した仮想マシンでテストを通すまで〜
h1d3mun3
1
620
AI Agent時代のリアーキテクチャ戦略と実践
hokaccha
9
5.4k
Featured
See All Featured
SEO for Brand Visibility & Recognition
aleyda
0
4.8k
A better future with KSS
kneath
240
18k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.4k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.2k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
920
4 Signs Your Business is Dying
shpigford
187
23k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
1
550
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
430
Into the Great Unknown - MozCon
thekraken
41
2.8k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
390
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
310
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