mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-11 18:06:46 +00:00
fixed tests for PHP 5.2
This commit is contained in:
@@ -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'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user