diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeAccessLanguageTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeAccessLanguageTest.php index ec35003..77b96d6 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeAccessLanguageTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeAccessLanguageTest.php @@ -55,32 +55,26 @@ class NodeAccessLanguageTest extends NodeTestBase { $web_user = $this->drupalCreateUser(array('access content')); $node = $this->drupalCreateNode(array('body' => array('hu' => array(array())), 'langcode' => 'hu')); $this->assertTrue($node->langcode == 'hu', t('Node created as Hungarian.')); - - $base_node_access = array('view' => TRUE, 'update' => FALSE, 'delete' => FALSE); - $this->assertNodeAccess($base_node_access, $node, $web_user); + $expected_node_access = array('view' => TRUE, 'update' => FALSE, 'delete' => FALSE); + $this->assertNodeAccess($expected_node_access, $node, $web_user); // Tests that Hungarian provided specifically results in the same. - $this->assertNodeAccess($base_node_access, $node, $web_user, 'hu'); - - // Tests that Catalan provided specifically results in the same. The node - // has no Catalan property support yet, but all properties are returned - // regardless of language with their original values. - $this->assertNodeAccess($base_node_access, $node, $web_user, 'ca'); + $this->assertNodeAccess($expected_node_access, $node, $web_user, 'hu'); - // Tests that Croatian provided specifically results in the same. The setup - // has no Croatian language configured, but all properties are returned - // regardless of language with their original values. - $this->assertNodeAccess($base_node_access, $node, $web_user, 'hr'); + // There is no specific Catalan version of this node and Croatian is not + // even set up on the system in this scenario, so these languages will not + // play a role in the node's permissions. + $this->assertNodeAccess($expected_node_access, $node, $web_user, 'ca'); + $this->assertNodeAccess($expected_node_access, $node, $web_user, 'hr'); // Reset the node access cache and turn on our test node_access() code. drupal_static_reset('node_access'); variable_set('node_access_test_secret_catalan', 1); // Tests that Hungarian is still accessible. - $this->assertNodeAccess($base_node_access, $node, $web_user, 'hu'); + $this->assertNodeAccess($expected_node_access, $node, $web_user, 'hu'); // Tests that Catalan is not accessible anymore. $this->assertNodeAccess(array('view' => FALSE, 'update' => FALSE, 'delete' => FALSE), $node, $web_user, 'ca'); - } }