コード例 #1
0
 function it_calls_the_command_bus(CommandBus $commandBus, Resource $resource)
 {
     $resource->getSrcFilename()->willReturn(self::FILE_NAME);
     $resource->getSrcNamespace()->willReturn(self::NAME_SPACE);
     $resource->getSrcClassname()->willReturn(self::CLASS_NAME);
     $data = ['name' => self::METHOD_NAME, 'arguments' => []];
     $command = Argument::type(GenerateConstructor::class);
     $commandBus->handle($command)->shouldbeCalled();
     $this->generate($resource, $data);
 }
コード例 #2
0
ファイル: CodeEditorSpec.php プロジェクト: memio/spec-gen
 function it_handles_commands(Command $command, CommandBus $commandBus)
 {
     $commandBus->handle($command)->shouldBeCalled();
     $this->handle($command);
 }