public function SPSTestStateFlowUnitTest::testStateFlowOverride in State Machine 7.2
File
- modules/
state_flow_sps/ tests/ StateFlowSPSTestUnit.test, line 11
Class
Code
public function testStateFlowOverride() {
$data = array(
'node' => array(
array(
'nid' => 2,
'vid' => 5,
),
array(
'nid' => 3,
'vid' => 8,
),
array(
'nid' => 2,
'vid' => 3,
),
),
);
$state_flow_override = new \Drupal\state_flow_sps\Test\StateFlowTestOverride(array(), new Drupal\sps\Test\Manager());
$state_flow_override
->setResults($data);
$overrides = $state_flow_override
->getOverrides();
$this
->assertEqual($overrides['node-2']['vid'], 5, 'StateFlowOverride should take the last published revision.');
}