Loading core/modules/content_moderation/tests/src/Kernel/ContentModerationAccessTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ protected function setUp() { /** * Tests access cacheability. */ public function testAccessCacheablity() { public function testAccessCacheability() { $node = $this->createNode(['type' => 'page']); /** @var \Drupal\user\RoleInterface $authenticated */ Loading core/modules/views/tests/modules/views_test_cacheable_metadata_calculation/src/Plugin/views/access/CachableMetadataCalculationTest.php→core/modules/views/tests/modules/views_test_cacheable_metadata_calculation/src/Plugin/views/access/CacheableMetadataCalculationTest.php +2 −2 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ * help = @Translation("Provides a test access plugin that reports when cacheable metadata is being calculated.") * ) */ class CachableMetadataCalculationTest extends AccessPluginBase implements CacheableDependencyInterface { class CacheableMetadataCalculationTest extends AccessPluginBase implements CacheableDependencyInterface { /** * The state service. Loading @@ -29,7 +29,7 @@ class CachableMetadataCalculationTest extends AccessPluginBase implements Cachea protected $state; /** * Constructs a CachableMetadataCalculationTest access plugin. * Constructs a CacheableMetadataCalculationTest access plugin. * * @param array $configuration * A configuration array containing information about the plugin instance. Loading core/modules/views/tests/src/Kernel/CachableMetadataCalculationTest.php→core/modules/views/tests/src/Kernel/CacheableMetadataCalculationTest.php +5 −5 Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ * * @group views */ class CachableMetadataCalculationTest extends KernelTestBase { class CacheableMetadataCalculationTest extends KernelTestBase { /** * The ID of the view used in the test. Loading Loading @@ -72,21 +72,21 @@ public function testCacheableMetadataCalculation() { // metadata to be recalculated. $this->enableModules([self::TEST_MODULE]); $this->installConfig([self::TEST_MODULE]); $this->assertCachebleMetadataHasBeenCalculated(FALSE); $this->assertCacheableMetadataHasBeenCalculated(FALSE); // When a view is saved normally we have to recalculate the cacheability // metadata, since it is possible changes have been made to the view that // affect cacheability. $view = $this->entityTypeManager->getStorage('view')->load(self::TEST_VIEW_ID); $view->save(); $this->assertCachebleMetadataHasBeenCalculated(TRUE); $this->assertCacheableMetadataHasBeenCalculated(TRUE); $this->resetState(); // When a view is being saved due to config being synchronized, the // cacheability metadata doesn't change so it should not be recalculated. $view->setSyncing(TRUE); $view->save(); $this->assertCachebleMetadataHasBeenCalculated(FALSE); $this->assertCacheableMetadataHasBeenCalculated(FALSE); } /** Loading @@ -96,7 +96,7 @@ public function testCacheableMetadataCalculation() { * TRUE if it is expected that the cacheability metadata has been * calculated. FALSE otherwise. */ protected function assertCachebleMetadataHasBeenCalculated($expected_result) { protected function assertCacheableMetadataHasBeenCalculated($expected_result) { $this->state->resetCache(); $this->assertEquals($expected_result, $this->state->get('views_test_cacheable_metadata_has_been_accessed')); } Loading Loading
core/modules/content_moderation/tests/src/Kernel/ContentModerationAccessTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ protected function setUp() { /** * Tests access cacheability. */ public function testAccessCacheablity() { public function testAccessCacheability() { $node = $this->createNode(['type' => 'page']); /** @var \Drupal\user\RoleInterface $authenticated */ Loading
core/modules/views/tests/modules/views_test_cacheable_metadata_calculation/src/Plugin/views/access/CachableMetadataCalculationTest.php→core/modules/views/tests/modules/views_test_cacheable_metadata_calculation/src/Plugin/views/access/CacheableMetadataCalculationTest.php +2 −2 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ * help = @Translation("Provides a test access plugin that reports when cacheable metadata is being calculated.") * ) */ class CachableMetadataCalculationTest extends AccessPluginBase implements CacheableDependencyInterface { class CacheableMetadataCalculationTest extends AccessPluginBase implements CacheableDependencyInterface { /** * The state service. Loading @@ -29,7 +29,7 @@ class CachableMetadataCalculationTest extends AccessPluginBase implements Cachea protected $state; /** * Constructs a CachableMetadataCalculationTest access plugin. * Constructs a CacheableMetadataCalculationTest access plugin. * * @param array $configuration * A configuration array containing information about the plugin instance. Loading
core/modules/views/tests/src/Kernel/CachableMetadataCalculationTest.php→core/modules/views/tests/src/Kernel/CacheableMetadataCalculationTest.php +5 −5 Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ * * @group views */ class CachableMetadataCalculationTest extends KernelTestBase { class CacheableMetadataCalculationTest extends KernelTestBase { /** * The ID of the view used in the test. Loading Loading @@ -72,21 +72,21 @@ public function testCacheableMetadataCalculation() { // metadata to be recalculated. $this->enableModules([self::TEST_MODULE]); $this->installConfig([self::TEST_MODULE]); $this->assertCachebleMetadataHasBeenCalculated(FALSE); $this->assertCacheableMetadataHasBeenCalculated(FALSE); // When a view is saved normally we have to recalculate the cacheability // metadata, since it is possible changes have been made to the view that // affect cacheability. $view = $this->entityTypeManager->getStorage('view')->load(self::TEST_VIEW_ID); $view->save(); $this->assertCachebleMetadataHasBeenCalculated(TRUE); $this->assertCacheableMetadataHasBeenCalculated(TRUE); $this->resetState(); // When a view is being saved due to config being synchronized, the // cacheability metadata doesn't change so it should not be recalculated. $view->setSyncing(TRUE); $view->save(); $this->assertCachebleMetadataHasBeenCalculated(FALSE); $this->assertCacheableMetadataHasBeenCalculated(FALSE); } /** Loading @@ -96,7 +96,7 @@ public function testCacheableMetadataCalculation() { * TRUE if it is expected that the cacheability metadata has been * calculated. FALSE otherwise. */ protected function assertCachebleMetadataHasBeenCalculated($expected_result) { protected function assertCacheableMetadataHasBeenCalculated($expected_result) { $this->state->resetCache(); $this->assertEquals($expected_result, $this->state->get('views_test_cacheable_metadata_has_been_accessed')); } Loading