public function testGetNextStatusFails() { $item = new Item04(); $item->detachBehavior('workflow'); $item->attachBehavior('workflowForTest', ['class' => SimpleWorkflowBehavior::className(), 'defaultWorkflowId' => 'INVALID_ID']); $this->specify('getNextStatus throws exception if default workflow Id is invalid', function () use($item) { $this->setExpectedException('raoul2000\\workflow\\base\\WorkflowException', "Invalid workflow Id : 'INVALID_ID'"); $item->getNextStatuses(); }); }