Created
July 6, 2013 20:49
-
-
Save nelsonsar/5941237 to your computer and use it in GitHub Desktop.
Using more than one PHPUnit fixture in one test.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class DummyTest extends YourDatabaseTestClass | |
{ | |
protected function getDataSet() | |
{ | |
$firstDataSet = $this->createXMLDataSet(__DIR__ . '/fixtures/first_fixture.xml'); | |
$secondDataSet = $this->createXMLDataSet(__DIR__ . '/fixtures/second_fixture.xml'); | |
$dataSets = array( | |
$firstDataSet, $secondDataSet | |
); | |
$compositeDataSet = new PHPUnit_Extensions_Database_DataSet_CompositeDataSet($dataSets); | |
return $compositeDataSet; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment