mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 17:10:53 +00:00
Fix Component renderer
This commit is contained in:
parent
99e42afaa2
commit
4a68046178
3 changed files with 8 additions and 6 deletions
|
|
@ -132,9 +132,11 @@ final class Kernel extends HttpKernel
|
||||||
'template_event_with_context' => [
|
'template_event_with_context' => [
|
||||||
'blocks' => [
|
'blocks' => [
|
||||||
'block' => [
|
'block' => [
|
||||||
'component' => 'SomeTwigComponent',
|
'component' => [
|
||||||
'context' => [
|
'name' => 'SomeTwigComponent',
|
||||||
'baz' => 'qux',
|
'inputs' => [
|
||||||
|
'context' => 'expr:context',
|
||||||
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,7 @@ final class TemplateEventTest extends KernelTestCase
|
||||||
'<!-- BEGIN EVENT | event name: "template_event_with_context" -->',
|
'<!-- BEGIN EVENT | event name: "template_event_with_context" -->',
|
||||||
'<!-- BEGIN BLOCK | event name: "template_event_with_context", block name: "block", component: "SomeTwigComponent", priority: 0 -->',
|
'<!-- BEGIN BLOCK | event name: "template_event_with_context", block name: "block", component: "SomeTwigComponent", priority: 0 -->',
|
||||||
'Hello from the Twig Component :)',
|
'Hello from the Twig Component :)',
|
||||||
'Context: baz=qux, foo=bar',
|
'Context: foo=bar',
|
||||||
'<!-- END BLOCK | event name: "template_event_with_context", block name: "block" -->',
|
'<!-- END BLOCK | event name: "template_event_with_context", block name: "block" -->',
|
||||||
'<!-- END EVENT | event name: "template_event_with_context" -->',
|
'<!-- END EVENT | event name: "template_event_with_context" -->',
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ final class TwigComponentBlockRendererSpec extends ObjectBehavior
|
||||||
'Component',
|
'Component',
|
||||||
[
|
[
|
||||||
'foo' => 'bar',
|
'foo' => 'bar',
|
||||||
'bar' => 'expr:foo',
|
'bar' => 'expr:baz',
|
||||||
'nested' => [
|
'nested' => [
|
||||||
'foo' => 'expr:bar',
|
'foo' => 'expr:bar',
|
||||||
'bar' => 'expr:baz',
|
'bar' => 'expr:baz',
|
||||||
|
|
@ -90,7 +90,7 @@ final class TwigComponentBlockRendererSpec extends ObjectBehavior
|
||||||
$componentRenderer
|
$componentRenderer
|
||||||
->createAndRender('Component', [
|
->createAndRender('Component', [
|
||||||
'foo' => 'bar',
|
'foo' => 'bar',
|
||||||
'bar' => 'bar',
|
'bar' => 'qux',
|
||||||
'nested' => [
|
'nested' => [
|
||||||
'foo' => 'baz',
|
'foo' => 'baz',
|
||||||
'bar' => 'qux',
|
'bar' => 'qux',
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue