|
|
@ -43,7 +43,7 @@ class AccessTest extends KernelTestBase { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* {@inheritdoc} |
|
|
|
* {@inheritdoc} |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static $modules = [ |
|
|
|
protected static $modules = [ |
|
|
|
'twig_tweak', |
|
|
|
'twig_tweak', |
|
|
|
'twig_tweak_test', |
|
|
|
'twig_tweak_test', |
|
|
|
'node', |
|
|
|
'node', |
|
|
@ -97,8 +97,8 @@ class AccessTest extends KernelTestBase { |
|
|
|
self::assertArrayHasKey('#node', $build); |
|
|
|
self::assertArrayHasKey('#node', $build); |
|
|
|
$expected_cache = [ |
|
|
|
$expected_cache = [ |
|
|
|
'tags' => [ |
|
|
|
'tags' => [ |
|
|
|
'node:1', |
|
|
|
|
|
|
|
'node_view', |
|
|
|
'node_view', |
|
|
|
|
|
|
|
'node:1', |
|
|
|
], |
|
|
|
], |
|
|
|
'contexts' => [], |
|
|
|
'contexts' => [], |
|
|
|
'max-age' => Cache::PERMANENT, |
|
|
|
'max-age' => Cache::PERMANENT, |
|
|
@ -112,8 +112,8 @@ class AccessTest extends KernelTestBase { |
|
|
|
self::assertArrayHasKey('#node', $build); |
|
|
|
self::assertArrayHasKey('#node', $build); |
|
|
|
$expected_cache = [ |
|
|
|
$expected_cache = [ |
|
|
|
'tags' => [ |
|
|
|
'tags' => [ |
|
|
|
'node:1', |
|
|
|
|
|
|
|
'node_view', |
|
|
|
'node_view', |
|
|
|
|
|
|
|
'node:1', |
|
|
|
'tag_from_twig_tweak_test_node_access', |
|
|
|
'tag_from_twig_tweak_test_node_access', |
|
|
|
], |
|
|
|
], |
|
|
|
'contexts' => [ |
|
|
|
'contexts' => [ |
|
|
@ -129,8 +129,8 @@ class AccessTest extends KernelTestBase { |
|
|
|
self::assertArrayHasKey('#node', $build); |
|
|
|
self::assertArrayHasKey('#node', $build); |
|
|
|
$expected_cache = [ |
|
|
|
$expected_cache = [ |
|
|
|
'tags' => [ |
|
|
|
'tags' => [ |
|
|
|
'node:1', |
|
|
|
|
|
|
|
'node_view', |
|
|
|
'node_view', |
|
|
|
|
|
|
|
'node:1', |
|
|
|
], |
|
|
|
], |
|
|
|
'contexts' => [], |
|
|
|
'contexts' => [], |
|
|
|
'max-age' => Cache::PERMANENT, |
|
|
|
'max-age' => Cache::PERMANENT, |
|
|
@ -170,8 +170,8 @@ class AccessTest extends KernelTestBase { |
|
|
|
'user.permissions', |
|
|
|
'user.permissions', |
|
|
|
], |
|
|
|
], |
|
|
|
'tags' => [ |
|
|
|
'tags' => [ |
|
|
|
'node:1', |
|
|
|
|
|
|
|
'tag_from_twig_tweak_test_node_access', |
|
|
|
'tag_from_twig_tweak_test_node_access', |
|
|
|
|
|
|
|
'node:1', |
|
|
|
], |
|
|
|
], |
|
|
|
'max-age' => 50, |
|
|
|
'max-age' => 50, |
|
|
|
]; |
|
|
|
]; |
|
|
@ -205,8 +205,8 @@ class AccessTest extends KernelTestBase { |
|
|
|
$expected_cache = [ |
|
|
|
$expected_cache = [ |
|
|
|
'contexts' => ['user.roles:authenticated'], |
|
|
|
'contexts' => ['user.roles:authenticated'], |
|
|
|
'tags' => [ |
|
|
|
'tags' => [ |
|
|
|
'config:core.entity_form_display.node.article.default', |
|
|
|
|
|
|
|
'node:1', |
|
|
|
'node:1', |
|
|
|
|
|
|
|
'config:core.entity_form_display.node.article.default', |
|
|
|
], |
|
|
|
], |
|
|
|
'max-age' => Cache::PERMANENT, |
|
|
|
'max-age' => Cache::PERMANENT, |
|
|
|
]; |
|
|
|
]; |
|
|
@ -219,13 +219,13 @@ class AccessTest extends KernelTestBase { |
|
|
|
self::assertArrayHasKey('#form_id', $build); |
|
|
|
self::assertArrayHasKey('#form_id', $build); |
|
|
|
$expected_cache = [ |
|
|
|
$expected_cache = [ |
|
|
|
'contexts' => [ |
|
|
|
'contexts' => [ |
|
|
|
|
|
|
|
'user.roles:authenticated', |
|
|
|
'user', |
|
|
|
'user', |
|
|
|
'user.permissions', |
|
|
|
'user.permissions', |
|
|
|
'user.roles:authenticated', |
|
|
|
|
|
|
|
], |
|
|
|
], |
|
|
|
'tags' => [ |
|
|
|
'tags' => [ |
|
|
|
'config:core.entity_form_display.node.article.default', |
|
|
|
|
|
|
|
'node:1', |
|
|
|
'node:1', |
|
|
|
|
|
|
|
'config:core.entity_form_display.node.article.default', |
|
|
|
'tag_from_twig_tweak_test_node_access', |
|
|
|
'tag_from_twig_tweak_test_node_access', |
|
|
|
], |
|
|
|
], |
|
|
|
'max-age' => 50, |
|
|
|
'max-age' => 50, |
|
|
@ -238,8 +238,8 @@ class AccessTest extends KernelTestBase { |
|
|
|
$expected_cache = [ |
|
|
|
$expected_cache = [ |
|
|
|
'contexts' => ['user.roles:authenticated'], |
|
|
|
'contexts' => ['user.roles:authenticated'], |
|
|
|
'tags' => [ |
|
|
|
'tags' => [ |
|
|
|
'config:core.entity_form_display.node.article.default', |
|
|
|
|
|
|
|
'node:1', |
|
|
|
'node:1', |
|
|
|
|
|
|
|
'config:core.entity_form_display.node.article.default', |
|
|
|
], |
|
|
|
], |
|
|
|
'max-age' => Cache::PERMANENT, |
|
|
|
'max-age' => Cache::PERMANENT, |
|
|
|
]; |
|
|
|
]; |
|
|
@ -279,8 +279,8 @@ class AccessTest extends KernelTestBase { |
|
|
|
self::assertArrayHasKey('form_id', $build); |
|
|
|
self::assertArrayHasKey('form_id', $build); |
|
|
|
$expected_cache = [ |
|
|
|
$expected_cache = [ |
|
|
|
'contexts' => [ |
|
|
|
'contexts' => [ |
|
|
|
'user.permissions', |
|
|
|
|
|
|
|
'user.roles:authenticated', |
|
|
|
'user.roles:authenticated', |
|
|
|
|
|
|
|
'user.permissions', |
|
|
|
], |
|
|
|
], |
|
|
|
'tags' => ['config:core.entity_form_display.node.article.default'], |
|
|
|
'tags' => ['config:core.entity_form_display.node.article.default'], |
|
|
|
'max-age' => Cache::PERMANENT, |
|
|
|
'max-age' => Cache::PERMANENT, |
|
|
@ -292,8 +292,8 @@ class AccessTest extends KernelTestBase { |
|
|
|
self::assertArrayHasKey('form_id', $build); |
|
|
|
self::assertArrayHasKey('form_id', $build); |
|
|
|
$expected_cache = [ |
|
|
|
$expected_cache = [ |
|
|
|
'contexts' => [ |
|
|
|
'contexts' => [ |
|
|
|
'user.permissions', |
|
|
|
|
|
|
|
'user.roles:authenticated', |
|
|
|
'user.roles:authenticated', |
|
|
|
|
|
|
|
'user.permissions', |
|
|
|
], |
|
|
|
], |
|
|
|
'tags' => ['config:core.entity_form_display.node.article.default'], |
|
|
|
'tags' => ['config:core.entity_form_display.node.article.default'], |
|
|
|
'max-age' => Cache::PERMANENT, |
|
|
|
'max-age' => Cache::PERMANENT, |
|
|
@ -525,8 +525,8 @@ class AccessTest extends KernelTestBase { |
|
|
|
self::assertArrayHasKey('#node', $build); |
|
|
|
self::assertArrayHasKey('#node', $build); |
|
|
|
$expected_cache = [ |
|
|
|
$expected_cache = [ |
|
|
|
'tags' => [ |
|
|
|
'tags' => [ |
|
|
|
'node:1', |
|
|
|
|
|
|
|
'node_view', |
|
|
|
'node_view', |
|
|
|
|
|
|
|
'node:1', |
|
|
|
], |
|
|
|
], |
|
|
|
'contexts' => [], |
|
|
|
'contexts' => [], |
|
|
|
'max-age' => Cache::PERMANENT, |
|
|
|
'max-age' => Cache::PERMANENT, |
|
|
@ -540,8 +540,8 @@ class AccessTest extends KernelTestBase { |
|
|
|
self::assertArrayHasKey('#node', $build); |
|
|
|
self::assertArrayHasKey('#node', $build); |
|
|
|
$expected_cache = [ |
|
|
|
$expected_cache = [ |
|
|
|
'tags' => [ |
|
|
|
'tags' => [ |
|
|
|
'node:1', |
|
|
|
|
|
|
|
'node_view', |
|
|
|
'node_view', |
|
|
|
|
|
|
|
'node:1', |
|
|
|
'tag_from_twig_tweak_test_node_access', |
|
|
|
'tag_from_twig_tweak_test_node_access', |
|
|
|
], |
|
|
|
], |
|
|
|
'contexts' => [ |
|
|
|
'contexts' => [ |
|
|
@ -557,8 +557,8 @@ class AccessTest extends KernelTestBase { |
|
|
|
self::assertArrayHasKey('#node', $build); |
|
|
|
self::assertArrayHasKey('#node', $build); |
|
|
|
$expected_cache = [ |
|
|
|
$expected_cache = [ |
|
|
|
'tags' => [ |
|
|
|
'tags' => [ |
|
|
|
'node:1', |
|
|
|
|
|
|
|
'node_view', |
|
|
|
'node_view', |
|
|
|
|
|
|
|
'node:1', |
|
|
|
], |
|
|
|
], |
|
|
|
'contexts' => [], |
|
|
|
'contexts' => [], |
|
|
|
'max-age' => Cache::PERMANENT, |
|
|
|
'max-age' => Cache::PERMANENT, |
|
|
|