Skip to content

Commit

Permalink
test for summary with perception, packages to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
giansalex committed Jan 13, 2018
1 parent b2b4c2f commit bdcfecc
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
7 changes: 6 additions & 1 deletion README.md
Expand Up @@ -43,6 +43,11 @@ Caracteristicas
- Consulta de Cdr

### XML
- Estandar UBL v2
- Estandar UBL v2, v2.1
- Signature xmldsig

### Used Packages
- [greenter/core](https://github.com/giansalex/greenter-core)
- [greenter/xml](https://github.com/giansalex/greenter-xml)
- [greenter/ws](https://github.com/giansalex/greenter-ws)
- [greenter/xmldsig](https://github.com/giansalex/xmldsig)
4 changes: 2 additions & 2 deletions composer.json
Expand Up @@ -14,9 +14,9 @@
"require": {
"php": ">=5.5.9",
"greenter/xmldsig": "^1.0",
"greenter/core": "^1.0",
"greenter/core": "^1.1",
"greenter/ws": "^1.0",
"greenter/xml": "^1.0"
"greenter/xml": "^1.1"
},
"require-dev": {
"phpunit/phpunit": ">=4.8 < 6.0"
Expand Down
7 changes: 7 additions & 0 deletions tests/Greenter/Factory/FeFactoryBase.php
Expand Up @@ -21,6 +21,7 @@
use Greenter\Model\Summary\Summary;
use Greenter\Model\Summary\SummaryDetail;
use Greenter\Model\Summary\SummaryDetailV2;
use Greenter\Model\Summary\SummaryPerception;
use Greenter\Model\Summary\SummaryV2;
use Greenter\Model\Voided\Voided;
use Greenter\Model\Voided\VoidedDetail;
Expand Down Expand Up @@ -320,6 +321,12 @@ protected function getSummaryV2()
->setSerieNro('B001-22')
->setClienteTipo('1')
->setClienteNro('55667733')
->setPercepcion((new SummaryPerception())
->setCodReg('01')
->setTasa(2.00)
->setMtoBase(200.00)
->setMto(4.00)
->setMtoTotal(204.00))
->setEstado('1')
->setTotal(200)
->setMtoOperGravadas(3)
Expand Down
4 changes: 0 additions & 4 deletions tests/Greenter/Factory/FeFactoryTest.php
Expand Up @@ -111,10 +111,6 @@ public function testResumenV2()
$this->assertInstanceOf(SummarySender::class, $this->factory->getSender());
$this->assertInstanceOf(SummaryV2Builder::class, $this->factory->getBuilder());

if (!$result->isSuccess()) {
return '123456789234';
}

$this->assertTrue($result->isSuccess());
$this->assertNotEmpty($result->getTicket());
$this->assertEquals(13, strlen($result->getTicket()));
Expand Down

0 comments on commit bdcfecc

Please sign in to comment.