diff --git a/core/modules/node/src/Tests/NodeAccessRebuildNodeGrantsTest.php b/core/modules/node/src/Tests/NodeAccessRebuildNodeGrantsTest.php index a0735ec..7147975 100644 --- a/core/modules/node/src/Tests/NodeAccessRebuildNodeGrantsTest.php +++ b/core/modules/node/src/Tests/NodeAccessRebuildNodeGrantsTest.php @@ -20,7 +20,7 @@ class NodeAccessRebuildNodeGrantsTest extends NodeTestBase { * * @var \Drupal\user\UserInterface */ - protected $web_user; + protected $webUser; /** * {@inheritdoc} @@ -31,23 +31,23 @@ protected function setUp() { $admin_user = $this->drupalCreateUser(array('administer site configuration', 'access administration pages', 'access site reports', 'bypass node access')); $this->drupalLogin($admin_user); - $this->web_user = $this->drupalCreateUser(); + $this->webUser = $this->drupalCreateUser(); } /** * Tests rebuilding the node access permissions table with content. */ - function testNodeAccessRebuildNodeGrants() { + public function testNodeAccessRebuildNodeGrants() { \Drupal::service('module_installer')->install(['node_access_test']); $this->resetAll(); $node = $this->drupalCreateNode(array( - 'uid' => $this->web_user->id(), + 'uid' => $this->webUser->id(), )); // Default realm access and node records are present. - $this->assertTrue(\Drupal::service('node.grant_storage')->access($node, 'view', 'en', $this->web_user), 'The expected node access records are present'); - $this->assertEqual(1, \Drupal::service('node.grant_storage')->checkAll($this->web_user), 'There is an all realm access record'); + $this->assertTrue(\Drupal::service('node.grant_storage')->access($node, 'view', 'en', $this->webUser), 'The expected node access records are present'); + $this->assertEqual(1, \Drupal::service('node.grant_storage')->checkAll($this->webUser), 'There is an all realm access record'); $this->assertTrue(\Drupal::state()->get('node.node_access_needs_rebuild'), 'Node access permissions need to be rebuilt'); // Rebuild permissions. @@ -57,14 +57,14 @@ function testNodeAccessRebuildNodeGrants() { // Test if the rebuild has been successful. $this->assertNull(\Drupal::state()->get('node.node_access_needs_rebuild'), 'Node access permissions have been rebuilt'); - $this->assertTrue(\Drupal::service('node.grant_storage')->access($node, 'view', 'en', $this->web_user), 'The expected node access records are present'); - $this->assertFalse(\Drupal::service('node.grant_storage')->checkAll($this->web_user), 'There is no all realm access record'); + $this->assertTrue(\Drupal::service('node.grant_storage')->access($node, 'view', 'en', $this->webUser), 'The expected node access records are present'); + $this->assertFalse(\Drupal::service('node.grant_storage')->checkAll($this->webUser), 'There is no all realm access record'); } /** * Tests rebuilding the node access permissions table with no content. */ - function testNodeAccessRebuildNoAccessModules() { + public function testNodeAccessRebuildNoAccessModules() { // Default realm access is present. $this->assertEqual(1, \Drupal::service('node.grant_storage')->count(), 'There is an all realm access record');