This repository has been archived by the owner on Dec 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from giansalex/feature/http1_1-requests
HTTP 1.1
- Loading branch information
Showing
10 changed files
with
120 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Peru\Jne; | ||
|
||
use Peru\Http\ContextClient; | ||
use Peru\Services\DniInterface; | ||
|
||
class DniFactory | ||
{ | ||
public function create(): DniInterface | ||
{ | ||
return new Dni(new ContextClient(), new DniParser()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Peru\Sunat; | ||
|
||
use Peru\Http\ContextClient; | ||
use Peru\Services\RucInterface; | ||
|
||
class RucFactory | ||
{ | ||
public function create(): RucInterface | ||
{ | ||
return new Ruc(new ContextClient(), new RucParser(new HtmlParser())); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Tests\Peru\Jne; | ||
|
||
use Peru\Jne\Dni; | ||
use Peru\Jne\DniFactory; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class DniFactoryTest extends TestCase | ||
{ | ||
public function testCreate() | ||
{ | ||
$factory = new DniFactory(); | ||
|
||
$cs = $factory->create(); | ||
|
||
$this->assertInstanceOf(Dni::class, $cs); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Tests\Peru\Sunat; | ||
|
||
use Peru\Sunat\Ruc; | ||
use Peru\Sunat\RucFactory; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class RucFactoryTest extends TestCase | ||
{ | ||
public function testCreate() | ||
{ | ||
$factory = new RucFactory(); | ||
|
||
$cs = $factory->create(); | ||
|
||
$this->assertInstanceOf(Ruc::class, $cs); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters