function it_maps_array_to_object(Payment $object) { $data = ['id' => 32, 'type' => 'my_type']; $object->setId(32)->shouldBeCalled(); $object->setType('my_type')->shouldBeCalled(); $this->map($data, $object); }
public function testBeginAuthorization() { $session = $this->client->getContainer()->get('session'); $payment = new Payment(); $payment->setId('payment_id'); $auth = new AuthorizationInformation(); $auth->setUrl('http://...'); $auth->setData('auth_data'); $payment->setAuthorizationInformation($auth); $session->set('cardinity_payment', $payment->serialize()); $crawler = $this->client->request('GET', '/cardinity/authorization/begin'); $this->assertEquals(200, $this->client->getResponse()->getStatusCode()); }