function PublishContentWebCaseTest::publishcontent_do_operation in Publish Content 5.2
Same name and namespace in other branches
- 6 tests/publishcontent.test \PublishContentWebCaseTest::publishcontent_do_operation()
4 calls to PublishContentWebCaseTest::publishcontent_do_operation()
- PublishContentWebCaseTest::assert_current_user_cannot_publish_node in tests/
publishcontent.test - PublishContentWebCaseTest::assert_current_user_cannot_unpublish_node in tests/
publishcontent.test - PublishContentWebCaseTest::assert_current_user_can_publish_node in tests/
publishcontent.test - PublishContentWebCaseTest::assert_current_user_can_unpublish_node in tests/
publishcontent.test
File
- tests/
publishcontent.test, line 31 - Unit tests for Publish Content module. prerequesite: make sure that 'authenticated user' does not have any access like 'publish [content type] content' or 'unpublish [content type] content'
Class
- PublishContentWebCaseTest
- @file Unit tests for Publish Content module. prerequesite: make sure that 'authenticated user' does not have any access like 'publish [content type] content' or 'unpublish [content type] content'
Code
function publishcontent_do_operation($nid, $op, $expected_status, $msg = NULL) {
$this
->drupalGet(url("node/{$nid}/{$op}", NULL, NULL, TRUE));
$node = node_load($nid, NULL, TRUE);
$this
->assertEqual($node->status, $expected_status, $msg);
}