Skip to content

Commit dda4f8a

Browse files
author
Joan He
committed
MAGETWO-95659: Fix and Unskip MTF OnePageCheckoutOfflinePaymentMethodsTest
- address code review comments
1 parent b8304ce commit dda4f8a

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertCartIsEmpty.php

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
67

78
namespace Magento\Checkout\Test\Constraint;
89

@@ -29,8 +30,10 @@ class AssertCartIsEmpty extends AbstractConstraint
2930
* @param BrowserInterface $browser
3031
* @return void
3132
*/
32-
public function processAssert(CheckoutCart $checkoutCart, BrowserInterface $browser)
33-
{
33+
public function processAssert(
34+
CheckoutCart $checkoutCart,
35+
BrowserInterface $browser
36+
): void {
3437
$checkoutCart->open();
3538
$cartEmptyBlock = $checkoutCart->getCartEmptyBlock();
3639

@@ -46,7 +49,7 @@ public function processAssert(CheckoutCart $checkoutCart, BrowserInterface $brow
4649
$browser->getUrl(),
4750
true,
4851
'Wrong link to main page on empty cart page: expected - ' . $_ENV['app_frontend_url']
49-
. ', actural - ' . $browser->getUrl()
52+
. ', actual - ' . $browser->getUrl()
5053
);
5154
}
5255

@@ -63,14 +66,18 @@ public function toString()
6366
/**
6467
* Asserts that two urls are equal
6568
*
66-
* @param string $url1
67-
* @param string $url2
69+
* @param string $expectedUrl
70+
* @param string $actualUrl
6871
* @param bool $ignoreScheme
6972
* @param string $message
7073
* @return void
7174
*/
72-
private function assertUrlEqual($expectedUrl, $actualUrl, $ignoreScheme = false, $message = '')
73-
{
75+
private function assertUrlEqual(
76+
string $expectedUrl,
77+
string $actualUrl,
78+
bool $ignoreScheme = false,
79+
string $message = ''
80+
): void {
7481
$urlArray1 = parse_url($expectedUrl);
7582
$urlArray2 = parse_url($actualUrl);
7683
if ($ignoreScheme) {

0 commit comments

Comments
 (0)