public function testSendCommandWithCallback() { $command = new stdClass(); $this->commandBus->expects($this->once())->method('dispatch')->with($this->identicalTo($command)); $this->callback->expects($this->once())->method('onSuccess')->will($this->returnValue(true)); $gateway = $this->createGateway(); $this->assertTrue($gateway->send($command, $this->callback)); }
/** * Returns onSuccess() of injected callback. * * {@inheritdoc} */ public function onSuccess() { if (null !== $this->callback) { return $this->callback->onSuccess(); } }