Jump to ratings and reviews
Rate this book

PHPUnit Manual

Rate this book
Table of Contents
1. Automating Tests ...................................................................................................... 1
2. PHPUnit's Goals ....................................................................................................... 3
3. Installing PHPUnit .................................................................................................... 5
4. Writing Tests for PHPUnit .......................................................................................... 6
Test Dependencies ................................................................................................ 6
Data Providers ...................................................................................................... 8
Testing Exceptions ................................................................................................ 9
Testing PHP Errors .............................................................................................. 12
5. The Command-Line Test Runner ................................................................................ 13
6. Fixtures .................................................................................................................. 17
More setUp() than tearDown() ............................................................................... 20
Variations .......................................................................................................... 20
Sharing Fixture ................................................................................................... 20
Global State ....................................................................................................... 21
7. Organizing Tests ..................................................................................................... 23
Composing a Test Suite Using the Filesystem .......................................................... 23
Composing a Test Suite Using XML Configuration ................................................... 24
Using the TestSuite Class ..................................................................................... 25
8. TestCase Extensions ................................................................................................. 28
Testing Output .................................................................................................... 28
9. Database Testing ..................................................................................................... 30
Data Sets ........................................................................................................... 31
Flat XML Data Set ...................................................................................... 31
XML Data Set ............................................................................................ 33
CSV Data Set ............................................................................................. 36
Replacement Data Set .................................................................................. 37
Operations .......................................................................................................... 37
Database Testing Best Practices ............................................................................. 38
10. Incomplete and Skipped Tests .................................................................................. 39
Incomplete Tests ................................................................................................. 39
Skipping Tests .................................................................................................... 40
11. Test Doubles .............................

196 pages, Kindle Edition

First published March 21, 2010

7 people want to read

About the author

Sebastian Bergmann

17 books2 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
0 (0%)
4 stars
4 (44%)
3 stars
4 (44%)
2 stars
1 (11%)
1 star
0 (0%)
Displaying 1 - 2 of 2 reviews
379 reviews10 followers
March 13, 2012
Non ho finito di leggerlo, preferendo marcarlo come "reference" perché effettivamente andrebbe letto e contemporaneamente applicato a progetti reali man mano che si approfondiscono i concetti.

E` interessante, ma in alcune parti oscuro per chi non ha mai fatto TDD, e gli esempi pratici sono abbastanza limitati.
Displaying 1 - 2 of 2 reviews

Can't find what you're looking for?

Get help and learn more about the design.