Mercurial > hg > cmmr2012-drupal-site
comparison core/modules/node/tests/src/Functional/NodeAccessGrantsCacheContextTest.php @ 5:12f9dff5fda9 tip
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:34:47 +0100 |
parents | c75dbcec494b |
children |
comparison
equal
deleted
inserted
replaced
4:a9cd425dd02b | 5:12f9dff5fda9 |
---|---|
1 <?php | 1 <?php |
2 | 2 |
3 namespace Drupal\Tests\node\Functional; | 3 namespace Drupal\Tests\node\Functional; |
4 | |
5 use Drupal\Core\Database\Database; | |
4 | 6 |
5 /** | 7 /** |
6 * Tests the node access grants cache context service. | 8 * Tests the node access grants cache context service. |
7 * | 9 * |
8 * @group node | 10 * @group node |
90 'realm' => 'node_access_all', | 92 'realm' => 'node_access_all', |
91 'grant_view' => 1, | 93 'grant_view' => 1, |
92 'grant_update' => 0, | 94 'grant_update' => 0, |
93 'grant_delete' => 0, | 95 'grant_delete' => 0, |
94 ]; | 96 ]; |
95 db_insert('node_access')->fields($record)->execute(); | 97 Database::getConnection()->insert('node_access')->fields($record)->execute(); |
96 | 98 |
97 // Put user accessUser (uid 0) in the realm. | 99 // Put user accessUser (uid 0) in the realm. |
98 \Drupal::state()->set('node_access_test.no_access_uid', 0); | 100 \Drupal::state()->set('node_access_test.no_access_uid', 0); |
99 drupal_static_reset('node_access_view_all_nodes'); | 101 drupal_static_reset('node_access_view_all_nodes'); |
100 $this->assertUserCacheContext([ | 102 $this->assertUserCacheContext([ |