Update to PhpUnitBridge and fix deprecations

This commit is contained in:
Jérémy Derussé
2019-08-07 16:35:43 +02:00
parent 9270385cd2
commit b776e41f5a
20 changed files with 152 additions and 189 deletions
+8 -10
View File
@@ -27,20 +27,20 @@ class ArrayTest extends \PHPUnit\Framework\TestCase
/**
* @group legacy
* @expectedException \Twig\Error\LoaderError
*/
public function testGetSourceWhenTemplateDoesNotExist()
{
$this->expectException('\Twig\Error\LoaderError');
$loader = new ArrayLoader([]);
$loader->getSource('foo');
}
/**
* @expectedException \Twig\Error\LoaderError
*/
public function testGetSourceContextWhenTemplateDoesNotExist()
{
$this->expectException('\Twig\Error\LoaderError');
$loader = new ArrayLoader([]);
$loader->getSourceContext('foo');
@@ -75,11 +75,10 @@ class ArrayTest extends \PHPUnit\Framework\TestCase
$this->assertEquals('foo:__bar', $loader->getCacheKey('foo'));
}
/**
* @expectedException \Twig\Error\LoaderError
*/
public function testGetCacheKeyWhenTemplateDoesNotExist()
{
$this->expectException('\Twig\Error\LoaderError');
$loader = new ArrayLoader([]);
$loader->getCacheKey('foo');
@@ -99,11 +98,10 @@ class ArrayTest extends \PHPUnit\Framework\TestCase
$this->assertTrue($loader->isFresh('foo', time()));
}
/**
* @expectedException \Twig\Error\LoaderError
*/
public function testIsFreshWhenTemplateDoesNotExist()
{
$this->expectException('\Twig\Error\LoaderError');
$loader = new ArrayLoader([]);
$loader->isFresh('foo', time());