public function testCreateWithSourceSuccess() { $this->specify('create a status instance with source component', function () { $src = Yii::createObject(['class' => WorkflowFileSource::className()]); $start = new Status(['id' => 'draft', 'workflowId' => 'workflow1', 'source' => $src]); verify('a source component is available', $start->getSource())->notNull(); }); }