/var/www/vhosts/ihelp.ro/_OLD/vendor/cakephp/cakephp/src/TestSuite/Fixture
Edit: /var/www/vhosts/ihelp.ro/_OLD/vendor/cakephp/cakephp/src/TestSuite/Fixture/FixtureInjector.php (3384B)
setDebug(in_array('--debug', $_SERVER['argv'], true));
}
$this->_fixtureManager = $manager;
$this->_fixtureManager->shutDown();
}
/**
* Iterates the tests inside a test suite and creates the required fixtures as
* they were expressed inside each test case.
*
* @param \PHPUnit\Framework\TestSuite $suite The test suite
* @return void
*/
public function startTestSuite(TestSuite $suite): void
{
if (empty($this->_first)) {
$this->_first = $suite;
}
}
/**
* Destroys the fixtures created by the fixture manager at the end of the test
* suite run
*
* @param \PHPUnit\Framework\TestSuite $suite The test suite
* @return void
*/
public function endTestSuite(TestSuite $suite): void
{
if ($this->_first === $suite) {
$this->_fixtureManager->shutDown();
}
}
/**
* Adds fixtures to a test case when it starts.
*
* @param \PHPUnit\Framework\Test $test The test case
* @return void
*/
public function startTest(Test $test): void
{
/** @psalm-suppress NoInterfaceProperties */
$test->fixtureManager = $this->_fixtureManager;
if ($test instanceof TestCase) {
$this->_fixtureManager->fixturize($test);
$this->_fixtureManager->load($test);
}
}
/**
* Unloads fixtures from the test case.
*
* @param \PHPUnit\Framework\Test $test The test case
* @param float $time current time
* @return void
*/
public function endTest(Test $test, float $time): void
{
if ($test instanceof TestCase) {
$this->_fixtureManager->unload($test);
}
}
}