diff --git a/tests/Twig/MockTwigLoader.php b/tests/Twig/MockTwigLoader.php index 0b469b3..18ae13b 100644 --- a/tests/Twig/MockTwigLoader.php +++ b/tests/Twig/MockTwigLoader.php @@ -9,29 +9,27 @@ namespace Core23\TwigFormatterBundle\Tests\Twig; -final class MockTwigLoader implements \Twig_LoaderInterface -{ - public function getSourceContext($name) - { - return $name; - } +use Twig\Loader\LoaderInterface; +use Twig\Source; - public function getSource($name) +final class MockTwigLoader implements LoaderInterface +{ + public function getSourceContext($name): Source { - return $name; + return new Source('', $name); } - public function getCacheKey($name) + public function getCacheKey($name): string { return $name; } - public function isFresh($name, $time) + public function isFresh($name, $time): bool { return true; } - public function exists($name) + public function exists($name): bool { return true; }