Skip to content
This repository has been archived by the owner on May 28, 2020. It is now read-only.

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
core23 committed Aug 19, 2019
1 parent fce44d3 commit 26be739
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions tests/Twig/MockTwigLoader.php
Expand Up @@ -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;
}
Expand Down

0 comments on commit 26be739

Please sign in to comment.