From 42a5ceaca16070b17c2ed221991091de4d8fc3b6 Mon Sep 17 00:00:00 2001 From: nripeshtrivedi Date: Feb 3, 2015 10:43:29 PM diff --git a/scheduler.cron.inc b/scheduler.cron.inc index 19830fe..58273e7 100644 --- a/scheduler.cron.inc +++ b/scheduler.cron.inc @@ -1,5 +1,7 @@ assertRaw(t('@type %title has been updated.', array('@type' => t('Basic page'), '%title' => check_plain($edit['title']))), 'The node is saved successfully when the publication date is in the past and the "publish" behavior is chosen.'); // Reload the changed node and check that it is published. - $node = node_load($node->nid, NULL, TRUE); + $node = Node::load($node->nid, NULL, TRUE); $this->assertTrue($node->status, 'The node has been published immediately when the publication date is in the past and the "publish" behavior is chosen.'); // Test the 'schedule' behavior: the node should be unpublished and become @@ -143,13 +145,13 @@ $this->assertRaw(t('This post is unpublished and will be published @publish_time.', array('@publish_time' => $edit['publish_on'])), 'The node is scheduled to be published when the publication date is in the past and the "schedule" behavior is chosen.'); // Reload the node and check that it is unpublished but scheduled correctly. - $node = node_load($node->nid, NULL, TRUE); + $node = Node::load($node->nid, NULL, TRUE); $this->assertFalse($node->status, 'The node has been unpublished when the publication date is in the past and the "schedule" behavior is chosen.'); $this->assertEqual(format_date($node->publish_on, 'custom', 'Y-m-d H:i:s'), $edit['publish_on'], 'The node is scheduled for the required date'); // Simulate a cron run and check that the node is published. scheduler_cron(); - $node = node_load($node->nid, NULL, TRUE); + $node = Node::load($node->nid, NULL, TRUE); $this->assertTrue($node->status, 'The node with publication date in the past and the "schedule" behavior has now been published by cron.'); } @@ -237,7 +239,7 @@ $node->{$action . '_on'} = strtotime('-1 day'); $node->save($node); scheduler_cron(); - return node_load($node->nid, NULL, TRUE); + return Node::load($node->nid, NULL, TRUE); } /** diff --git a/tests/scheduler_api.test b/tests/scheduler_api.test index af3c825..2809ce2 100644 --- a/tests/scheduler_api.test +++ b/tests/scheduler_api.test @@ -1,5 +1,7 @@ field_scheduler_test_approved[$node->language][0]['value'] = TRUE; $node->save($node); }