sebastianbergmann/phpunit — Issue #439: Using setUp() with Database TestCases requires parent::setUp();
Author: samtuke
Created: 2011-12-13 16:53:34+00:00
State: open

Database test cases that use a manually defined setUp() function will not seed the database with data specified in getDataSet() unless the setUp() function uses parent::setUp(); like this:

class DatabaseTest extends PHPUnit_Extensions_Database_TestCase
{
public function setUp() {
parent::setUp();

This is currently not clear in documentation, and without adding parent::setUp(); database tests will fail in comparisons as seed data will never be present.

Please update documentation to clearly explain this, or remove the requirement for adding parent::setUp(); to the setUp() function.

Thanks!