// Schedule future event echo "Scheduling future event...<br>"; $datetime = strftime("2100-%m-%d %H:%M:00"); $articlePublishObj2 = new ArticlePublish($newArticle->getArticleId(), 1, $datetime); $articlePublishObj2->create(); $articlePublishObj2->setPublishAction('P'); // Verify echo "Number of pending actions (should be zero): ".count(ArticlePublish::GetPendingActions())."<br>"; // Schedule past event echo "Scheduling past event...<br>"; $datetime = strftime("1900-%m-%d %H:%M:00"); $articlePublishObj3 = new ArticlePublish($newArticle->getArticleId(), 1, $datetime); $articlePublishObj3->create(); $articlePublishObj3->setPublishAction('P'); // Verify echo "Number of pending actions (should be one): ".count(ArticlePublish::GetPendingActions())."<br>"; // delete the article echo "Deleting the article.<br>"; $newArticle->delete(); echo "Deleting the events.<br>"; $articlePublishObj->delete(); $articlePublishObj2->delete(); $articlePublishObj3->delete(); echo "<h2>ISSUE AUTOPUBLISH TESTS</h2>";