fixed tests for PHP 5.2

This commit is contained in:
Fabien Potencier
2017-02-17 11:26:43 -08:00
parent ef2a7d7c36
commit f63c6e1a9a
@@ -18,7 +18,7 @@ class Twig_Tests_ContainerRuntimeLoaderTest extends PHPUnit_Framework_TestCase
{
$container = $this->getMockBuilder('Psr\Container\ContainerInterface')->getMock();
$container->expects($this->once())->method('has')->with('stdClass')->willReturn(true);
$container->expects($this->once())->method('get')->with('stdClass')->willReturn(new \Stdclass());
$container->expects($this->once())->method('get')->with('stdClass')->willReturn(new Stdclass());
$loader = new Twig_ContainerRuntimeLoader($container);
@@ -31,6 +31,7 @@ class Twig_Tests_ContainerRuntimeLoaderTest extends PHPUnit_Framework_TestCase
$container->expects($this->once())->method('has')->with('Foo');
$container->expects($this->never())->method('get');
$this->assertNull((new Twig_ContainerRuntimeLoader($container))->load('Foo'));
$loader = new Twig_ContainerRuntimeLoader($container);
$this->assertNull($loader->load('Foo'));
}
}