/** * @param bool $isGatewayActionsLocked * @param bool $canCapture * * @dataProvider canCaptureDataProvider */ public function testCanCapture($isGatewayActionsLocked, $canCapture) { $this->directpost->setData('info_instance', $this->paymentMock); $this->paymentMock->expects($this->any())->method('getAdditionalInformation')->with(Directpost::GATEWAY_ACTIONS_LOCKED_STATE_KEY)->willReturn($isGatewayActionsLocked); $this->assertEquals($canCapture, $this->directpost->canCapture()); }