/** * @test */ public function it_should_pass_the_original_update_from_cdbxml_command_to_the_wrapped_command_handler() { $command = new UpdateEventFromCdbXml(new String('foo'), new EventXmlString(file_get_contents(__DIR__ . '/Valid.xml'))); $this->security->expects($this->once())->method('allowsUpdateWithCdbXml')->with(new String('foo'))->willReturn(true); $this->wrappedCommandHandler->expects($this->once())->method('handle')->with($command); $this->commandHandler->handle($command); }
/** * @inheritdoc */ public function handle($command) { $this->guardPermissions($command); $this->wrapped->handle($command); }