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
120
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
Transcript
10 slides
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
More Decks by Abdala Cerqueira
See All by Abdala Cerqueira
Docker: multi-stage and multi-environment
abdala
3
750
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
150
PHP em todos os lugares
abdala
1
160
Automatizado rotinas com sua linguagem favorita
abdala
0
120
Presente! Software Livre
abdala
0
90
Other Decks in Programming
See All in Programming
LLM 101
dalinaum
0
510
AI Augmentation Techniques with Liberty
ivargrimstad
1
520
ローカルLLMの基本と近況 2611 / Local LLM basics and recent situation 2611
kishida
3
600
Web3Dライブラリを作ってVue Custom Rendererの仕組みを理解しよう / lets learn vue custom renderer by making 3d library
drumath2237
1
140
flutter_test のその先へ — Flutter アプリの LLM 機能に「評価」という品質保証を
kosukesaigusa
0
210
例外からRich Errorsまで Kotlinエラーハンドリングの進化を読み解く
shiita0903
0
220
Kotlin JVM用に作られたライブラリのKMPを前提とした再設計
jsoizo
0
210
止まらない比較を止める — 余帰納法で無限ストリームを比べる
tarao
0
190
Kawaiicon: Kubernetes, it's no longer cool, but let's secure it anyway!
barnbarn
0
140
Debian JP Projectのサーバー構成
uwabami
1
140
そのデザイントークン、Flutterでも同じ見た目になりますか?
nakamizu
0
430
Spec-Driven Development - Why Vaadin Is the Perfect Fit
simas
PRO
0
260
Featured
See All Featured
How to Talk to Developers About Accessibility
jct
2
620
Fireside Chat
paigeccino
43
4.1k
The Invisible Side of Design
smashingmag
301
52k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3.1k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
20k
Context Engineering - Making Every Token Count
addyosmani
9
1.3k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
A better future with KSS
kneath
240
18k
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
570
Designing Powerful Visuals for Engaging Learning
tmiket
1
660
BBQ
matthewcrist
90
10k