Loading core/modules/system/tests/src/Functional/Cache/AssertPageCacheContextsAndTagsTrait.php +2 −2 Original line number Diff line number Diff line Loading @@ -125,7 +125,7 @@ protected function assertCacheTags(array $expected_tags, $include_default_tags = * (optional) Whether the default contexts should automatically be included. * * @return bool * TRUE if the assertion succeeded, FALSE otherwise. * Always returns TRUE. */ protected function assertCacheContexts(array $expected_contexts, $message = NULL, $include_default_contexts = TRUE) { if ($include_default_contexts) { Loading @@ -142,7 +142,7 @@ protected function assertCacheContexts(array $expected_contexts, $message = NULL sort($expected_contexts); sort($actual_contexts); $this->assertSame($expected_contexts, $actual_contexts, $message ?? ''); return $actual_contexts === $expected_contexts; return TRUE; } /** Loading core/modules/system/tests/src/Functional/Session/SessionTest.php +1 −2 Original line number Diff line number Diff line Loading @@ -72,8 +72,7 @@ public function testSessionSaveRegenerate() { $this->drupalGet('user/login'); $this->submitForm($edit, 'Log in'); $this->drupalGet('user'); $pass = $this->assertSession()->pageTextContains($user->getAccountName()); $this->_logged_in = $pass; $this->assertSession()->pageTextContains($user->getAccountName()); $this->drupalGet('session-test/id'); $matches = []; Loading core/modules/toolbar/tests/src/Functional/ToolbarCacheContextsTest.php +2 −8 Original line number Diff line number Diff line Loading @@ -107,9 +107,6 @@ public function testToolbarCacheContextsCaller() { * Expected cache contexts for both users. * @param string $message * (optional) A verbose message to output. * * @return * TRUE if the assertion succeeded, FALSE otherwise. */ protected function assertToolbarCacheContexts(array $cache_contexts, $message = NULL) { // Default cache contexts that should exist on all test cases. Loading @@ -123,16 +120,13 @@ protected function assertToolbarCacheContexts(array $cache_contexts, $message = // Assert contexts for user1 which has only default permissions. $this->drupalLogin($this->adminUser); $this->drupalGet('test-page'); $return = $this->assertCacheContexts($cache_contexts); $this->assertCacheContexts($cache_contexts, $message); $this->drupalLogout(); // Assert contexts for user2 which has some additional permissions. $this->drupalLogin($this->adminUser2); $this->drupalGet('test-page'); $return = $return && $this->assertCacheContexts($cache_contexts); $this->assertTrue($return, $message); return $return; $this->assertCacheContexts($cache_contexts, $message); } /** Loading core/modules/views/tests/src/Functional/Plugin/DisplayPageWebTest.php +2 −5 Original line number Diff line number Diff line Loading @@ -160,9 +160,6 @@ public function testPagePaths() { * * @param string $path * Path that will be set as the view page display path. * * @return bool * Assertion result. */ public function assertPagePath($path) { $view = Views::getView('test_page_display_path'); Loading @@ -172,10 +169,10 @@ public function assertPagePath($path) { $this->container->get('router.builder')->rebuild(); // Check if we successfully changed the path. $this->drupalGet($path); $success = $this->assertSession()->statusCodeEquals(200); $this->assertSession()->statusCodeEquals(200); // Check if we don't get any error on the view edit page. $this->drupalGet('admin/structure/views/view/test_page_display_path'); return $success && $this->assertSession()->statusCodeEquals(200); $this->assertSession()->statusCodeEquals(200); } } Loading
core/modules/system/tests/src/Functional/Cache/AssertPageCacheContextsAndTagsTrait.php +2 −2 Original line number Diff line number Diff line Loading @@ -125,7 +125,7 @@ protected function assertCacheTags(array $expected_tags, $include_default_tags = * (optional) Whether the default contexts should automatically be included. * * @return bool * TRUE if the assertion succeeded, FALSE otherwise. * Always returns TRUE. */ protected function assertCacheContexts(array $expected_contexts, $message = NULL, $include_default_contexts = TRUE) { if ($include_default_contexts) { Loading @@ -142,7 +142,7 @@ protected function assertCacheContexts(array $expected_contexts, $message = NULL sort($expected_contexts); sort($actual_contexts); $this->assertSame($expected_contexts, $actual_contexts, $message ?? ''); return $actual_contexts === $expected_contexts; return TRUE; } /** Loading
core/modules/system/tests/src/Functional/Session/SessionTest.php +1 −2 Original line number Diff line number Diff line Loading @@ -72,8 +72,7 @@ public function testSessionSaveRegenerate() { $this->drupalGet('user/login'); $this->submitForm($edit, 'Log in'); $this->drupalGet('user'); $pass = $this->assertSession()->pageTextContains($user->getAccountName()); $this->_logged_in = $pass; $this->assertSession()->pageTextContains($user->getAccountName()); $this->drupalGet('session-test/id'); $matches = []; Loading
core/modules/toolbar/tests/src/Functional/ToolbarCacheContextsTest.php +2 −8 Original line number Diff line number Diff line Loading @@ -107,9 +107,6 @@ public function testToolbarCacheContextsCaller() { * Expected cache contexts for both users. * @param string $message * (optional) A verbose message to output. * * @return * TRUE if the assertion succeeded, FALSE otherwise. */ protected function assertToolbarCacheContexts(array $cache_contexts, $message = NULL) { // Default cache contexts that should exist on all test cases. Loading @@ -123,16 +120,13 @@ protected function assertToolbarCacheContexts(array $cache_contexts, $message = // Assert contexts for user1 which has only default permissions. $this->drupalLogin($this->adminUser); $this->drupalGet('test-page'); $return = $this->assertCacheContexts($cache_contexts); $this->assertCacheContexts($cache_contexts, $message); $this->drupalLogout(); // Assert contexts for user2 which has some additional permissions. $this->drupalLogin($this->adminUser2); $this->drupalGet('test-page'); $return = $return && $this->assertCacheContexts($cache_contexts); $this->assertTrue($return, $message); return $return; $this->assertCacheContexts($cache_contexts, $message); } /** Loading
core/modules/views/tests/src/Functional/Plugin/DisplayPageWebTest.php +2 −5 Original line number Diff line number Diff line Loading @@ -160,9 +160,6 @@ public function testPagePaths() { * * @param string $path * Path that will be set as the view page display path. * * @return bool * Assertion result. */ public function assertPagePath($path) { $view = Views::getView('test_page_display_path'); Loading @@ -172,10 +169,10 @@ public function assertPagePath($path) { $this->container->get('router.builder')->rebuild(); // Check if we successfully changed the path. $this->drupalGet($path); $success = $this->assertSession()->statusCodeEquals(200); $this->assertSession()->statusCodeEquals(200); // Check if we don't get any error on the view edit page. $this->drupalGet('admin/structure/views/view/test_page_display_path'); return $success && $this->assertSession()->statusCodeEquals(200); $this->assertSession()->statusCodeEquals(200); } }