public function testShouldReturnPayments() { $extractor = new \Extractors\FileExtractor(); $data = $extractor->readFile(dirname(__FILE__) . $this->RESOURCE_PATH . 'lhv.xml'); $payment = new \Entities\Payment('256.00', '', '108/V', 'Testing'); $payments = $this->_parser->parseData($data); $this->assertEquals($payment, $payments->offsetGet(2)); }
public function testShouldReturnMultipleOrderPayments() { $extractor = new \Extractors\FileExtractor(); $data = $extractor->readFile(dirname(__FILE__) . $this->RESOURCE_PATH . 'iso20022orderMultiple.xml'); $payments = $this->_parser->parseData($data); $this->assertEquals(3, $payments->count()); $expected = new \Entities\Payment('123.45', '2016010700183611-1', '2016041921', 'Company OÜ'); $this->assertEquals($expected, $payments->offsetGet(2)); }