Commit 1a0793da authored by catch's avatar catch

Issue #1814402 by Lars Toomre, moe4715: Convert 'node_access_test_private()'...

Issue #1814402 by Lars Toomre, moe4715: Convert 'node_access_test_private()' variable to state() system.
parent b1933997
......@@ -27,10 +27,10 @@ public static function getInfo() {
);
}
function setUp() {
public function setUp() {
parent::setUp();
node_access_rebuild();
variable_set('node_access_test_private', TRUE);
state()->set('node_access_test.private', TRUE);
}
/**
......
......@@ -36,7 +36,7 @@ public static function getInfo() {
function setUp() {
parent::setUp();
node_access_rebuild();
variable_set('node_access_test_private', TRUE);
state()->set('node_access_test.private', TRUE);
}
/**
......
......@@ -37,7 +37,7 @@ public function setUp() {
parent::setUp();
node_access_rebuild();
variable_set('node_access_test_private', TRUE);
state()->set('node_access_test.private', TRUE);
}
/**
......
......@@ -33,7 +33,7 @@ function node_access_test_node_grants($account, $op) {
function node_access_test_node_access_records(Node $node) {
$grants = array();
// For NodeAccessBaseTableTestCase, only set records for private nodes.
if (!variable_get('node_access_test_private') || $node->private) {
if (!state()->get('node_access_test.private') || $node->private) {
$grants[] = array(
'realm' => 'node_access_test',
'gid' => 8888,
......@@ -180,7 +180,7 @@ function node_access_entity_test_page() {
*/
function node_access_test_form_node_form_alter(&$form, $form_state) {
// Only show this checkbox for NodeAccessBaseTableTestCase.
if (variable_get('node_access_test_private')) {
if (state()->get('node_access_test.private')) {
$node = $form_state['controller']->getEntity($form_state);
$form['private'] = array(
'#type' => 'checkbox',
......
......@@ -35,10 +35,9 @@ public static function getInfo() {
public function setUp() {
parent::setUp();
node_access_rebuild();
variable_set('node_access_test_private', TRUE);
state()->set('node_access_test.private', TRUE);
}
/**
* Ensure private node on /tracker is only visible to users with permission.
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment