-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
1,859 additions
and
481 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2.0.0 | ||
2.0.1 |
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
103 changes: 0 additions & 103 deletions
103
spec/Genesis/Api/Request/Financial/OnlineBankingPayments/GiroPaySpec.php
This file was deleted.
Oops, something went wrong.
45 changes: 45 additions & 0 deletions
45
spec/Genesis/Api/Request/NonFinancial/Alternatives/Klarna/ReleaseAuthorizationSpec.php
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,45 @@ | ||
<?php | ||
|
||
namespace spec\Genesis\Api\Request\NonFinancial\Alternatives\Klarna; | ||
|
||
use Genesis\Api\Request\NonFinancial\Alternatives\Klarna\ReleaseAuthorization; | ||
use Genesis\Builder; | ||
use PhpSpec\ObjectBehavior; | ||
use spec\SharedExamples\Genesis\Api\Request\RequestExamples; | ||
|
||
/** | ||
* Class ReleaseAuthorizationSpec | ||
* @package spec\Genesis\Api\Request\NonFinancial\Alternatives\Klarna | ||
*/ | ||
class ReleaseAuthorizationSpec extends ObjectBehavior | ||
{ | ||
use RequestExamples; | ||
|
||
public function it_is_initializable() | ||
{ | ||
$this->shouldHaveType(ReleaseAuthorization::class); | ||
} | ||
|
||
public function it_should_use_builder_xml() | ||
{ | ||
$this->getApiConfig('format')->shouldBe(Builder::XML); | ||
} | ||
|
||
public function it_should_contain_correct_parent_node() | ||
{ | ||
$this->setRequestParameters(); | ||
$this->getDocument()->shouldContain('release_remaining_authorization_request'); | ||
} | ||
|
||
public function it_should_fail_when_missing_required_params() | ||
{ | ||
$this->testMissingRequiredParameters(['transaction_id']); | ||
} | ||
|
||
protected function setRequestParameters() | ||
{ | ||
$faker = $this->getFaker(); | ||
|
||
$this->setTransactionId($faker->numberBetween(1, PHP_INT_MAX)); | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
spec/Genesis/Api/Request/NonFinancial/Alternatives/Klarna/ResendInvoiceSpec.php
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,45 @@ | ||
<?php | ||
|
||
namespace spec\Genesis\Api\Request\NonFinancial\Alternatives\Klarna; | ||
|
||
use Genesis\Api\Request\NonFinancial\Alternatives\Klarna\ResendInvoice; | ||
use Genesis\Builder; | ||
use PhpSpec\ObjectBehavior; | ||
use spec\SharedExamples\Genesis\Api\Request\RequestExamples; | ||
|
||
/** | ||
* Class ResendInvoiceSpec | ||
* @package spec\Genesis\Api\Request\NonFinancial\Alternatives\Klarna | ||
*/ | ||
class ResendInvoiceSpec extends ObjectBehavior | ||
{ | ||
use RequestExamples; | ||
|
||
public function it_is_initializable() | ||
{ | ||
$this->shouldHaveType(ResendInvoice::class); | ||
} | ||
|
||
public function it_should_use_builder_xml() | ||
{ | ||
$this->getApiConfig('format')->shouldBe(Builder::XML); | ||
} | ||
|
||
public function it_should_contain_correct_parent_node() | ||
{ | ||
$this->setRequestParameters(); | ||
$this->getDocument()->shouldContain('resend_invoice_request'); | ||
} | ||
|
||
public function it_should_fail_when_missing_required_params() | ||
{ | ||
$this->testMissingRequiredParameters(['transaction_id']); | ||
} | ||
|
||
protected function setRequestParameters() | ||
{ | ||
$faker = $this->getFaker(); | ||
|
||
$this->setTransactionId($faker->numberBetween(1, PHP_INT_MAX)); | ||
} | ||
} |
66 changes: 66 additions & 0 deletions
66
spec/Genesis/Api/Request/NonFinancial/Alternatives/Klarna/UpdateAddressSpec.php
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,66 @@ | ||
<?php | ||
|
||
namespace spec\Genesis\Api\Request\NonFinancial\Alternatives\Klarna; | ||
|
||
use Genesis\Api\Request\NonFinancial\Alternatives\Klarna\UpdateAddress; | ||
use Genesis\Builder; | ||
use Genesis\Exceptions\ErrorParameter; | ||
use PhpSpec\ObjectBehavior; | ||
use spec\SharedExamples\Genesis\Api\Request\RequestExamples; | ||
|
||
/** | ||
* Class UpdateAddressSpec | ||
* @package spec\Genesis\Api\Request\NonFinancial\Alternatives\Klarna | ||
*/ | ||
class UpdateAddressSpec extends ObjectBehavior | ||
{ | ||
use RequestExamples; | ||
|
||
public function it_is_initializable() | ||
{ | ||
$this->shouldHaveType(UpdateAddress::class); | ||
} | ||
|
||
public function it_should_use_builder_xml() | ||
{ | ||
$this->getApiConfig('format')->shouldBe(Builder::XML); | ||
} | ||
|
||
public function it_should_contain_correct_parent_node() | ||
{ | ||
$this->setRequestParameters(); | ||
$this->getDocument()->shouldContain('update_order_address_request'); | ||
} | ||
|
||
public function it_should_fail_when_missing_required_params() | ||
{ | ||
$this->testMissingRequiredParameters([ | ||
'transaction_id', | ||
'billing_country', | ||
'shipping_country' | ||
]); | ||
} | ||
|
||
protected function setRequestParameters() | ||
{ | ||
$faker = $this->getFaker(); | ||
|
||
$this->setTransactionId($faker->numberBetween(1, PHP_INT_MAX)); | ||
|
||
$this->setBillingFirstName($faker->firstName); | ||
$this->setBillingLastName($faker->lastName); | ||
$this->setBillingAddress1($faker->streetAddress); | ||
$this->setBillingZipCode($faker->postcode); | ||
$this->setBillingCity($faker->city); | ||
$this->setBillingState($faker->state); | ||
$this->setBillingCountry($faker->countryCode()); | ||
|
||
$this->setShippingFirstName($faker->firstName); | ||
$this->setShippingLastName($faker->lastName); | ||
$this->setShippingAddress1($faker->streetAddress); | ||
$this->setShippingZipCode($faker->postcode); | ||
$this->setShippingCity($faker->city); | ||
$this->setShippingState($faker->state); | ||
$this->setShippingCountry($faker->countryCode()); | ||
} | ||
} |
Oops, something went wrong.