From 43671ffa3b8696806b33cc3943b96fb9a3635170 Mon Sep 17 00:00:00 2001 From: Valdeir S Date: Tue, 18 Aug 2020 21:19:49 -0300 Subject: [PATCH] feat: cria classe para os dados de Debito --- .../src/Domains/PaymentMethod/DebitCard.php | 22 +++++++++++++++ .../unit/Domains/PaymentMethod/BoletoTest.php | 2 ++ .../Domains/PaymentMethod/DebitCardTest.php | 27 +++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 upload/system/library/PagSeguro/src/Domains/PaymentMethod/DebitCard.php create mode 100644 upload/system/library/PagSeguro/tests/unit/Domains/PaymentMethod/DebitCardTest.php diff --git a/upload/system/library/PagSeguro/src/Domains/PaymentMethod/DebitCard.php b/upload/system/library/PagSeguro/src/Domains/PaymentMethod/DebitCard.php new file mode 100644 index 0000000..b1fdff4 --- /dev/null +++ b/upload/system/library/PagSeguro/src/Domains/PaymentMethod/DebitCard.php @@ -0,0 +1,22 @@ +paymentLink; + } +} diff --git a/upload/system/library/PagSeguro/tests/unit/Domains/PaymentMethod/BoletoTest.php b/upload/system/library/PagSeguro/tests/unit/Domains/PaymentMethod/BoletoTest.php index 9400969..9261d05 100644 --- a/upload/system/library/PagSeguro/tests/unit/Domains/PaymentMethod/BoletoTest.php +++ b/upload/system/library/PagSeguro/tests/unit/Domains/PaymentMethod/BoletoTest.php @@ -2,6 +2,7 @@ use PHPUnit\Framework\TestCase; use ValdeirPsr\PagSeguro\Domains\PaymentMethod\Boleto; +use ValdeirPsr\PagSeguro\Domains\PaymentMethod\AbstractPaymentMethod; class BoletoTest extends TestCase { @@ -12,6 +13,7 @@ public function newInstance() { $instance = new Boleto(); $this->assertInstanceOf(Boleto::class, $instance); + $this->assertInstanceOf(AbstractPaymentMethod::class, $instance); } /** diff --git a/upload/system/library/PagSeguro/tests/unit/Domains/PaymentMethod/DebitCardTest.php b/upload/system/library/PagSeguro/tests/unit/Domains/PaymentMethod/DebitCardTest.php new file mode 100644 index 0000000..3e8bb05 --- /dev/null +++ b/upload/system/library/PagSeguro/tests/unit/Domains/PaymentMethod/DebitCardTest.php @@ -0,0 +1,27 @@ +assertInstanceOf(DebitCard::class, $instance); + $this->assertInstanceOf(AbstractPaymentMethod::class, $instance); + } + + /** + * @test + */ + public function getMethodShouldReturnEFT() + { + $instance = new DebitCard(); + $this->assertEquals('eft', $instance->getMethod()); + } +}