Esempio n. 1
0
 function it_delegate_merge_execution($api, $actionMapping)
 {
     $api->converse('session_id', 'my text', Argument::any())->willReturn($this->stepData[Step::TYPE_MERGE]);
     $expectedContext = new Context();
     $expectedContext->add('custom', 'value');
     $actionMapping->merge('session_id', Argument::type(Context::class), $this->stepData[Step::TYPE_MERGE]['entities'])->willReturn($expectedContext);
     $api->converse('session_id', null, $expectedContext)->willReturn($this->stepData[Step::TYPE_STOP]);
     $actionMapping->stop('session_id', Argument::type(Context::class))->shouldBeCalled();
     $this->converse('session_id', 'my text')->shouldReturn($expectedContext);
 }