Skip to content

Commit

Permalink
420 - Test coverage: GetAvailablePaymentMethodsTest for Guest
Browse files Browse the repository at this point in the history
1. Fix typo errors
  • Loading branch information
atwixfirster committed Mar 7, 2019
1 parent 9395e76 commit 8ab0ab3
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ protected function setUp()
*/
public function testGetPaymentMethodsFromGuestCart()
{
$maskedQuoteId = $this->getMaskedQuoteIdByReversedQuoteId('test_order_with_simple_product_without_address');
$maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId('test_order_with_simple_product_without_address');
$query = $this->getCartAvailablePaymentMethodsQuery($maskedQuoteId);
$response = $this->graphQlQuery($query);

Expand All @@ -75,7 +75,7 @@ public function testGetPaymentMethodsFromGuestCart()
*/
public function testGetPaymentMethodsFromAnotherCustomerCart()
{
$maskedQuoteId = $this->getMaskedQuoteIdByReversedQuoteId('test_order_1');
$maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId('test_order_1');
$query = $this->getCartAvailablePaymentMethodsQuery($maskedQuoteId);

$this->expectExceptionMessage(
Expand All @@ -90,7 +90,7 @@ public function testGetPaymentMethodsFromAnotherCustomerCart()
*/
public function testGetPaymentMethodsIfPaymentsAreNotSet()
{
$maskedQuoteId = $this->getMaskedQuoteIdByReversedQuoteId('test_order_with_simple_product_without_address');
$maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId('test_order_with_simple_product_without_address');
$query = $this->getCartAvailablePaymentMethodsQuery($maskedQuoteId);
$response = $this->graphQlQuery($query);

Expand Down Expand Up @@ -128,13 +128,13 @@ private function getCartAvailablePaymentMethodsQuery(
}

/**
* @param string $reversedQuoteId
* @param string $reservedOrderId
* @return string
*/
private function getMaskedQuoteIdByReversedQuoteId(string $reversedQuoteId): string
private function getMaskedQuoteIdByReservedOrderId(string $reservedOrderId): string
{
$quote = $this->quoteFactory->create();
$this->quoteResource->load($quote, $reversedQuoteId, 'reserved_order_id');
$this->quoteResource->load($quote, $reservedOrderId, 'reserved_order_id');

return $this->quoteIdToMaskedId->execute((int)$quote->getId());
}
Expand Down

0 comments on commit 8ab0ab3

Please sign in to comment.