no longer do. -When you make a change to code, how do you know if it will affect more then just code you are editing? -With tests, you can know for sure if everything is working as it was.
process where tests are written before any code is. - There are 3 steps in TDD. 1. Write tests that fail. 2. Write code to make them pass. 3. Refactor code. 4. Repeat
- The core model of the business is the basis for all designs and tests. - Initiates a collaboration between the technical and business side of a project to get to the heart of the problem.
by Test (tests for Foo would be FooTest) * most of the time -Inherits from PHPUnit_Framework_TestCase* -Test cases are public methods starting with test -File name should match class name
each test are the same protected function setUp() { ... } setUp - ran before each test protected function tearDown() { ... } tearDown - ran after each test protected static function setUpBeforeClass() { ... } setUpBeforeClass - static method called before any test protected static function tearDownAfterClass() { ... } tearDownAfterClass - static method called after all test
is a single file or directory -Options * --bootstrap - File that is run before tests phpunit --bootstrap includes/app/config.php --verbose LexileTest phpunit --bootstrap includes/app/config.php --verbose tests
of the same name -Simple Unit tests for PHP 5.3+ -Single file -Colored output -Couldn’t find an easy way to test multiple files -Doesn’t provide exit status -No support for BDD or DDD -Easy installation git clone https://github.com/funkatron/FUnit.git