diff --git a/tests/ParserTest.php b/tests/ParserTest.php index 80056d24b..415585ccd 100644 --- a/tests/ParserTest.php +++ b/tests/ParserTest.php @@ -14,6 +14,7 @@ namespace Twig\Tests; use PHPUnit\Framework\TestCase; use Twig\Environment; use Twig\Loader\LoaderInterface; +use Twig\Node\MacroNode; use Twig\Node\Node; use Twig\Node\SetNode; use Twig\Node\TextNode; diff --git a/tests/TemplateTest.php b/tests/TemplateTest.php index 9ef29460a..92064a564 100644 --- a/tests/TemplateTest.php +++ b/tests/TemplateTest.php @@ -29,7 +29,8 @@ class TemplateTest extends TestCase */ public function testDisplayBlocksAcceptTemplateOnlyAsBlocks() { - $template = $this->getMockForAbstractClass(Template::class, [], '', false); + $twig = new Environment($this->getMockBuilder(LoaderInterface::class)->getMock()); + $template = new TemplateForTest($twig); $template->displayBlock('foo', [], ['foo' => [new \stdClass(), 'foo']]); }