protected function _testWorkflowOperation($method, $method_params, $wf_name, $wf_params = null, $model_params = ['id' => 'dev'])
{
$model = $this->_createModel($model_params);
if ($wf_params) {
$this->workflows->expects($this->any())->method('create')->with($wf_name, ['params' => $wf_params])->willReturn($this->workflow);
} else {
$this->workflows->expects($this->any())->method('create')->with($wf_name)->willReturn($this->workflow);
}
$wf = call_user_func_array([$model, $method], $method_params);
$this->assertEquals($this->workflow, $wf);
}