Exemplo n.º 1
0
 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));
 }
Exemplo n.º 2
0
 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);
 }
Exemplo n.º 3
0
 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));
 }