Skip to content

Commit

Permalink
[DependencyInjection] fixed unit tests when using phar and suhosin
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Mar 5, 2011
1 parent 6790e45 commit 4a8f101
Showing 1 changed file with 6 additions and 1 deletion.
Expand Up @@ -33,7 +33,6 @@ static public function setUpBeforeClass()
require_once self::$fixturesPath.'/includes/foo.php';
require_once self::$fixturesPath.'/includes/ProjectExtension.php';
require_once self::$fixturesPath.'/includes/ProjectWithXsdExtension.php';
require_once self::$fixturesPath.'/includes/ProjectWithXsdExtensionInPhar.phar';
}

public function testLoad()
Expand Down Expand Up @@ -251,6 +250,12 @@ public function testExtensions()

public function testExtensionInPhar()
{
if (extension_loaded('suhosin') && false === strpos(ini_get('suhosin.executor.include.whitelist'), 'phar')) {
$this->markTestSkipped('To run this test, add "phar" to the "suhosin.executor.include.whitelist" settings in your php.ini file.');
}

require_once self::$fixturesPath.'/includes/ProjectWithXsdExtensionInPhar.phar';

// extension with an XSD in PHAR archive
$container = new ContainerBuilder();
$container->registerExtension(new \ProjectWithXsdExtensionInPhar());
Expand Down

0 comments on commit 4a8f101

Please sign in to comment.