/**
  * Adds fixtures to a test case when it starts.
  *
  * @param \PHPUnit_Framework_Test $test The test case
  * @return void
  */
 public function startTest(PHPUnit_Framework_Test $test)
 {
     $test->fixtureManager = $this->_fixtureManager;
     if ($test instanceof TestCase) {
         $this->_fixtureManager->fixturize($test);
         $this->_fixtureManager->load($test);
     }
 }
예제 #2
0
 /**
  * Chooses which fixtures to load for a given test
  *
  * @return void
  */
 public function loadFixtures($fixtures)
 {
     if (func_num_args() > 1) {
         $fixtures = func_get_args();
     }
     $this->testCase->fixtures = $fixtures;
     $this->fixtureManager->fixturize($this->testCase);
     $this->fixtureManager->load($this->testCase);
 }