cleanup global context usage in widgets

This commit is contained in:
Kevin Papst
2020-08-18 11:39:41 +02:00
parent 08696651fd
commit 9597015413
29 changed files with 458 additions and 202 deletions

View File

@@ -10,7 +10,7 @@
namespace App\Tests\Twig;
use App\Twig\WidgetExtension;
use App\Widget\Type\Counter;
use App\Widget\Type\More;
use App\Widget\WidgetInterface;
use App\Widget\WidgetRendererInterface;
use App\Widget\WidgetService;
@@ -72,7 +72,7 @@ class WidgetExtensionTest extends TestCase
public function testRenderWidgetByString()
{
$widget = new Counter();
$widget = new More();
$sut = $this->getSut(true, $widget, new TestRenderer());
$options = ['foo' => 'bar', 'dataType' => 'blub'];
$result = $sut->renderWidget('test', $options);
@@ -82,7 +82,7 @@ class WidgetExtensionTest extends TestCase
public function testRenderWidgetObject()
{
$widget = new Counter();
$widget = new More();
$sut = $this->getSut(null, null, new TestRenderer());
$options = ['foo' => 'bar', 'dataType' => 'blub'];
$result = $sut->renderWidget($widget, $options);