DDC-1641 - Fix test producing failure when skipped.
This commit is contained in:
parent
19a4d05035
commit
299def4712
@ -22,6 +22,21 @@ class SetupTest extends \Doctrine\Tests\OrmTestCase
|
||||
$this->originalIncludePath = get_include_path();
|
||||
}
|
||||
|
||||
public function tearDown()
|
||||
{
|
||||
if ( ! $this->originalIncludePath) {
|
||||
return;
|
||||
}
|
||||
|
||||
set_include_path($this->originalIncludePath);
|
||||
$loaders = spl_autoload_functions();
|
||||
for ($i = 0; $i < count($loaders); $i++) {
|
||||
if ($i > $this->originalAutoloaderCount+1) {
|
||||
spl_autoload_unregister($loaders[$i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function testGitAutoload()
|
||||
{
|
||||
Setup::registerAutoloadGit(__DIR__ . "/../../../../../");
|
||||
@ -92,15 +107,4 @@ class SetupTest extends \Doctrine\Tests\OrmTestCase
|
||||
$this->assertSame($cache, $config->getMetadataCacheImpl());
|
||||
$this->assertSame($cache, $config->getQueryCacheImpl());
|
||||
}
|
||||
|
||||
public function tearDown()
|
||||
{
|
||||
set_include_path($this->originalIncludePath);
|
||||
$loaders = spl_autoload_functions();
|
||||
for ($i = 0; $i < count($loaders); $i++) {
|
||||
if ($i > $this->originalAutoloaderCount+1) {
|
||||
spl_autoload_unregister($loaders[$i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user