Skip to content
Snippets Groups Projects

Closes #3471410

Files
4
@@ -6,8 +6,8 @@
@@ -6,8 +6,8 @@
use Drupal\Core\Cache\Cache;
use Drupal\Core\Cache\Cache;
use Drupal\help\HelpTopicTwig;
use Drupal\help\HelpTopicTwig;
 
use Drupal\Tests\Core\Template\StubTwigTemplate;
use Drupal\Tests\UnitTestCase;
use Drupal\Tests\UnitTestCase;
use Twig\Template;
use Twig\TemplateWrapper;
use Twig\TemplateWrapper;
/**
/**
@@ -100,7 +100,12 @@ protected function getTwigMock() {
@@ -100,7 +100,12 @@ protected function getTwigMock() {
->disableOriginalConstructor()
->disableOriginalConstructor()
->getMock();
->getMock();
$template = $this->getMockForAbstractClass(Template::class, [$twig], '', TRUE, TRUE, TRUE, ['render']);
$template = $this
 
->getMockBuilder(StubTwigTemplate::class)
 
->onlyMethods(['render'])
 
->setConstructorArgs([$twig])
 
->getMock();
 
$template
$template
->method('render')
->method('render')
->willReturn(self::PLUGIN_INFORMATION['body']);
->willReturn(self::PLUGIN_INFORMATION['body']);
Loading