public function PublishContentWebTestBase::enablePublishContentForContentType in Publish Content 7
Allow content type to be used with publish content.
5 calls to PublishContentWebTestBase::enablePublishContentForContentType()
- PublishContentCheckboxTests::testAccessNodeAdd in tests/
publishcontent.test - Test access to the node add page is working.
- PublishContentWebTestBase::testBasicPublishCallback in tests/
publishcontent.test - Test basic publish ability using the publishcontent_test module.
- PublishContentWebTestBase::testNotPublishUnpublish in tests/
publishcontent.test - Test the combination of unpublish but not publish.
- PublishContentWebTestBase::testPublishNotUnpublish in tests/
publishcontent.test - Test the combination of publish but not unpublish permissions.
- PublishContentWebTestBase::testPublishUnpublish in tests/
publishcontent.test - Test the combination of both publish and unpublish.
File
- tests/
publishcontent.test, line 38 - Unit tests for Publish Content module.
Class
- PublishContentWebTestBase
- We test to ensure we are not messing up with the default Drupal access for view node i.e. a owner of a node can view it even if unpublished.
Code
public function enablePublishContentForContentType($types) {
if (!is_array($types)) {
$types = array(
$types,
);
}
foreach ($types as $type) {
variable_set('publishcontent_' . $type, TRUE);
}
// Rebuild SimpleTests permissions cache.
$this
->checkPermissions(array(), TRUE);
}