/** * @param FinancialTransaction $transaction * * @depends testNewTransactionRequiresAnAction */ public function testGetResponseReturnsFeedbackResponse(FinancialTransaction $transaction) { $plugin = $this->createPluginMock(); $plugin->setFeedbackResponse(new FeedbackResponse($this->requestStubber->getStubbedRequest())); $class = new \ReflectionClass($plugin); $getResponseMethod = $class->getMethod('getResponse'); $getResponseMethod->setAccessible(true); $response = $getResponseMethod->invokeArgs($plugin, array($transaction)); $this->assertInstanceOf('ETS\\Payment\\OgoneBundle\\Response\\FeedbackResponse', $response); }
public function testConstructor() { $feedbackResponse = new FeedbackResponse($this->requestStubber->getStubbedRequest()); $this->assertSame($this->requestStubber->getMapForParameterBags(false), $feedbackResponse->getValues()); $this->assertSame($this->requestStubber->getHashFromMap(), $feedbackResponse->getHash()); }