Skip to content

Commit 47eb7b2

Browse files
committed
MAGETWO-58997: Copy past detector fails in Vault module
- Fixed failed tests
1 parent 091fb4e commit 47eb7b2

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

app/code/Magento/Vault/Api/PaymentMethodListInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ interface PaymentMethodListInterface
1616
{
1717
/**
1818
* Get list of available vault payments
19-
* @param $storeId
19+
* @param int $storeId
2020
* @return VaultPaymentInterface[]
2121
*/
2222
public function getList($storeId);

app/code/Magento/Vault/Model/PaymentMethodList.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,6 @@ function (MethodInterface $methodInstance) {
7373
return $methodInstance instanceof VaultPaymentInterface;
7474
}
7575
);
76-
return $availableMethods;
76+
return array_values($availableMethods);
7777
}
7878
}

dev/tests/integration/testsuite/Magento/Braintree/Model/PaymentMethodListTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ protected function setUp()
3737
}
3838

3939
/**
40-
* @covers \Magento\Vault\Api\PaymentMethodListInterface::getList
4140
* @magentoDataFixture Magento/Braintree/_files/payments.php
4241
*/
4342
public function testGetList()
@@ -58,7 +57,6 @@ public function testGetList()
5857
}
5958

6059
/**
61-
* @covers \Magento\Vault\Api\PaymentMethodListInterface::getActiveList
6260
* @magentoDataFixture Magento/Braintree/_files/payments.php
6361
*/
6462
public function testGetActiveList()
@@ -67,6 +65,7 @@ public function testGetActiveList()
6765

6866
static::assertNotEmpty($vaultPayments);
6967
static::assertCount(1, $vaultPayments);
70-
static::assertEquals(PayPalConfigProvider::PAYPAL_VAULT_CODE, $vaultPayments[0]->getCode());
68+
$payment = array_pop($vaultPayments);
69+
static::assertEquals(PayPalConfigProvider::PAYPAL_VAULT_CODE, $payment->getCode());
7170
}
7271
}

0 commit comments

Comments
 (0)