Skip to content

Commit 49b0c16

Browse files
committed
[Customer] Cover Customer Navigation Block by Unit Test
1 parent 539e4c6 commit 49b0c16

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

app/code/Magento/Customer/Test/Unit/Block/Account/NavigationTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,29 +63,29 @@ protected function setUp()
6363
*/
6464
public function testGetLinksWithCustomerAndWishList()
6565
{
66-
$wishListLink = $this->getMockBuilder(WishListLink::class)
66+
$wishListLinkMock = $this->getMockBuilder(WishListLink::class)
6767
->disableOriginalConstructor()
6868
->setMethods(['getSortOrder'])
6969
->getMock();
7070

71-
$customerAccountLink = $this->getMockBuilder(CustomerAccountLink::class)
71+
$customerAccountLinkMock = $this->getMockBuilder(CustomerAccountLink::class)
7272
->disableOriginalConstructor()
7373
->setMethods(['getSortOrder'])
7474
->getMock();
7575

76-
$wishListLink->expects($this->any())
76+
$wishListLinkMock->expects($this->any())
7777
->method('getSortOrder')
7878
->willReturn(100);
7979

80-
$customerAccountLink->expects($this->any())
80+
$customerAccountLinkMock->expects($this->any())
8181
->method('getSortOrder')
8282
->willReturn(20);
8383

8484
$nameInLayout = 'top.links';
8585

8686
$blockChildren = [
87-
'wishListLink' => $wishListLink,
88-
'customerAccountLink' => $customerAccountLink
87+
'wishListLink' => $wishListLinkMock,
88+
'customerAccountLink' => $customerAccountLinkMock
8989
];
9090

9191
$this->navigation->setNameInLayout($nameInLayout);
@@ -97,8 +97,8 @@ public function testGetLinksWithCustomerAndWishList()
9797
/* Assertion */
9898
$this->assertEquals(
9999
[
100-
0 => $wishListLink,
101-
1 => $customerAccountLink
100+
0 => $wishListLinkMock,
101+
1 => $customerAccountLinkMock
102102
],
103103
$this->navigation->getLinks()
104104
);

0 commit comments

Comments
 (0)