diff --git a/core/modules/views/src/Tests/NodeAccessTest.php b/core/modules/views/src/Tests/NodeAccessTest.php index fd24402..dc5296a 100644 --- a/core/modules/views/src/Tests/NodeAccessTest.php +++ b/core/modules/views/src/Tests/NodeAccessTest.php @@ -137,9 +137,15 @@ function testViewsData() { // Enable the mynodeaccess module. \Drupal::service('module_installer')->install(['views_test_mynodeaccess']); - // Rebuild node-access permissions at admin/reports/status/rebuild - + + // Rebuild permissions. + /*$this->drupalGet('admin/reports/status/rebuild'); + $this->drupalPostForm(NULL, array(), t('Rebuild permissions')); + $this->assertText(t('The content access permissions have been rebuilt.'));*/ + node_access_rebuild(); + // Execute the view: admin and anonymous users will again see the same thing. + $this->drupalLogin($this->adminUser); $view->execute(); // Assert the row count of the view. @@ -149,12 +155,12 @@ function testViewsData() { // Execute the view as anonymous user. $this->drupalLogout(); + $view->execute(); // Assert the row count of the view. $count = count($view->result); debug($count); $this->assertEqual(2, $count, 'The number of returned rows match.'); - // Execute the view as anonymous user. }