/** * @test */ public function shouldDoNothingIfStatusAlreadySet() { $gatewayMock = $this->createGatewayMock(); $gatewayMock ->expects($this->never()) ->method('purchase') ; $gatewayMock ->expects($this->never()) ->method('completePurchase') ; $action = new OffsiteCaptureAction; $action->setApi($gatewayMock); $action->setPayment($this->createPaymentMock()); $action->execute(new Capture(array( '_status' => 'foo', ))); }