WorkflowUnitTest.test in Workflow 7
Same filename and directory in other branches
Contains workflow\lib\entity\WorkflowUnitTest.
File
includes/Test/WorkflowUnitTest.testView source
<?php
/**
* @file
* Contains workflow\lib\entity\WorkflowUnitTest.
*/
/**
* Tests for the Workflow classes.
*/
class WorkflowExampleTestCase extends DrupalWebTestCase {
protected $workflow;
public static function getInfo() {
return array(
'name' => 'Workflow',
'description' => 'Ensure that the Workflow API works as expected.',
'group' => 'Workflow',
);
}
public function setUp() {
parent::setUp('workflow');
// Enable any modules required for the test
}
// Create a simpletest_example node using the node form
public function testWorkflow() {
// $workflows = Workflow::getWorkflows();
// dpm($workflows, "These are the current Workflows in the system.");
$wid = 1;
$workflow = Workflow::load($wid);
$this
->assertEqual($workflow->wid, $wid, t('The wid of the Workflow should be the same as we decided.'));
$workflow = new Workflow($wid);
$this
->assertEqual($workflow->wid, $wid, t('The wid of the Workflow should be the same as we decided.'));
// $creation_state = $workflow->getCreationState();
// $this->assertEqual($creation_state, 1, t('The creation_state of wid 1 has value 1.'));
}
}
Classes
Name | Description |
---|---|
WorkflowExampleTestCase | Tests for the Workflow classes. |