Skip to content

Commit

Permalink
Add test (not parse xml)
Browse files Browse the repository at this point in the history
  • Loading branch information
giansalex committed Aug 19, 2017
1 parent 5d2925d commit 3b22ae1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/Greenter/Factory/FeFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,18 @@ public function testInvoice()
);
}

public function testInvalidInvoice()
{
$invoice = $this->getInvoice();
$invoice->setTipoMoneda('UHT');
$result = $this->factory->sendInvoice($invoice);

$this->assertFalse($result->isSuccess());
$this->assertNotNull($result->getError());
$this->assertEquals('0306', $result->getError()->getCode());
$this->assertEquals('No se puede leer (parsear) el archivo XML', $result->getError()->getMessage());
}

public function testInvoiceNotValidZipFileName()
{
$invoice = $this->getInvoice();
Expand Down

0 comments on commit 3b22ae1

Please sign in to comment.