diff --git a/core/modules/node/node.test b/core/modules/node/node.test index 93a4d97..5ad62ce 100644 --- a/core/modules/node/node.test +++ b/core/modules/node/node.test @@ -328,13 +328,20 @@ class NodeRevisionPermissionsTestCase extends DrupalWebTestCase { * Tests multiple calls to _node_revision_access() within the same request. */ function testNodeRevisionAccessCaching() { + // We have three users. Each corresponds to one revision permission. + // Test the results of _node_revision_access() for each permission. foreach ($this->users as $user_op => $user) { + // Visit the test page provided by node_revision_test.module. $this->drupalLogin($user); $this->drupalGet('node_revision_access_test/' . $this->node_revisions[1]->nid . '/' . $this->node_revisions[1]->vid); + + // Check results for each permission. Each permission is tested twice. foreach (array_keys($this->map) as $test_op) { + // If the user has the permission, access should be granted twice. if ($test_op == $user_op) { - $this->assertText(format_string("@op granted", array('@op' => $test_op))); + $this->assertNoUniqueText(format_string("@op granted", array('@op' => $test_op))); } + // Otherwise, access should not be granted. else { $this->assertNoText(format_string("@op granted", array('@op' => $test_op))); }