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 testShouldParseCSVFile() { $extractor = new \Extractors\FileExtractor(); $data = $extractor->readFile(dirname(__FILE__) . $this->RESOURCE_PATH . 'default_layout.csv'); $payments = $this->_parser->parseData($data); $this->assertEquals(1, $payments->count()); $payment = $payments->offsetGet(0); $this->assertEquals(new \Entities\Payment('110,40', 'EX161587VV708ZZ', '2016060403', 'FIRMALISED', '20160604038'), $payment); }
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)); }