Skip to content
Snippets Groups Projects
Commit d06d4dd4 authored by Alexey Korepov's avatar Alexey Korepov
Browse files

Fixed wrong cache tag in examples

parent 41f61178
No related branches found
No related tags found
No related merge requests found
......@@ -101,7 +101,7 @@ class TestHelpersExampleController extends ControllerBase {
return [
'#theme' => 'item_list',
'#items' => $articlesList,
'#cache' => ['tags' => ['node:type:article']],
'#cache' => ['tags' => ['node_list:article']],
];
}
......
......@@ -57,7 +57,7 @@ class TestHelpersExampleControllerKernelClassicTest extends FieldKernelTestBase
$result = $controller->articlesList();
$this->assertCount(1, $result['#items']);
$this->assertEquals('A2 (02.01.2023 by Alice)', $result['#items'][0]->getText());
$this->assertContains('node:type:article', $result['#cache']['tags']);
$this->assertContains('node_list:article', $result['#cache']['tags']);
}
}
......@@ -129,7 +129,7 @@ class TestHelpersExampleControllerClassicTest extends UnitTestCase {
$result = $controller->articlesList();
$this->assertCount(2, $result['#items']);
$this->assertEquals('A2 (02.01.2023 by Alice)', $result['#items'][0]->getText());
$this->assertContains('node:type:article', $result['#cache']['tags']);
$this->assertContains('node_list:article', $result['#cache']['tags']);
}
}
......@@ -46,7 +46,7 @@ class TestHelpersExampleControllerModernConditionsTest extends UnitTestCase {
$result = TestHelpers::createClass(TestHelpersExampleController::class)->articlesList();
$this->assertCount(2, $result['#items']);
$this->assertEquals('A2 (02.01.2023 by Alice)', $result['#items'][0]->getText());
$this->assertContains('node:type:article', $result['#cache']['tags']);
$this->assertContains('node_list:article', $result['#cache']['tags']);
}
}
......@@ -37,7 +37,7 @@ class TestHelpersExampleControllerModernResultTest extends UnitTestCase {
$result = TestHelpers::createClass(TestHelpersExampleController::class)->articlesList();
$this->assertCount(1, $result['#items']);
$this->assertEquals('A2 (02.01.2023 by Alice)', $result['#items'][0]->getText());
$this->assertContains('node:type:article', $result['#cache']['tags']);
$this->assertContains('node_list:article', $result['#cache']['tags']);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment