You are here

protected function DraftyWebTestCase::setRevision in Drafty 7

Make it easy for drafty_enforce to subclass.

Parameters

$entity: An entity object.

3 calls to DraftyWebTestCase::setRevision()
DraftyFieldCollectionTest::testDraftyFieldCollection in tests/DraftyFieldCollectionTest.test
DraftyTestCase::testDraftRevisions in tests/DraftyTestCase.test
Create a node and check creation of draft and published revisions.
DraftyTestCase::testDraftyRevisionCleanup in tests/DraftyTestCase.test
Create a published node. Then create a draft and check if the previous published revision was cleaned by cron.
1 method overrides DraftyWebTestCase::setRevision()
DraftyEnforceTestCase::setRevision in modules/drafty_enforce/DraftyEnforceTestCase.test
@inheritdoc

File

tests/DraftyWebTestCase.test, line 22

Class

DraftyWebTestCase
Defines a base class for testing Drafty revision support.

Code

protected function setRevision($entity) {
  $entity->revision = TRUE;
}