mirror of
https://github.com/twigphp/Twig.git
synced 2026-10-03 10:27:22 +00:00
Update to PhpUnitBridge and fix deprecations
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user