diff --git a/tests/Resources/retention/with-creditNote.xml b/tests/Resources/retention/with-creditNote.xml new file mode 100644 index 0000000..6967cb0 --- /dev/null +++ b/tests/Resources/retention/with-creditNote.xml @@ -0,0 +1,88 @@ + + + + + + + + 2.0 + 1.0 + + IdFactesol + + + 20101991319 + + + + + + + + #SignatureSP + + + + R001-00000006 + 2018-02-01 + + + 20101991319 + + + + + + 150140 + + + + LIMA + SANTIAGO DE SURCO + + PE + + + + + + + + + 20467463684 + + + + + + 01 + 3.00 + 21.00 + 679.00 + + F003-00000001 + 2018-02-01 + 1000.00 + + 1 + 500.00 + 2018-02-01 + + + 15.00 + 2018-02-01 + 485.00 + + PEN + PEN + 1.00 + 2018-02-01 + + + + + F003-00000001 + 2018-02-01 + 500.00 + + \ No newline at end of file diff --git a/tests/Xml/Parser/RetentionParserTest.php b/tests/Xml/Parser/RetentionParserTest.php index 010cf11..ccde506 100644 --- a/tests/Xml/Parser/RetentionParserTest.php +++ b/tests/Xml/Parser/RetentionParserTest.php @@ -33,7 +33,7 @@ public function testParseDoc($filename) $this->assertNotEmpty($detail->getTipoDoc()); $this->assertNotEmpty($detail->getNumDoc()); $this->assertNotNull($detail->getFechaEmision()); - $this->assertGreaterThan(0, count($detail->getPagos())); + $this->assertTrue(is_array($detail->getPagos())); $this->assertTrue(is_float($detail->getImpTotal())); $this->assertTrue(is_float($detail->getImpRetenido())); $this->assertTrue(is_float($detail->getImpPagar()));