Skip to content

Commit a7a1947

Browse files
author
Dmytro Vilchynskyi
committed
MAGETWO-32669: Incorrect style of persistent inscription
- fixed tests
1 parent 1cc3bb6 commit a7a1947

File tree

3 files changed

+4
-39
lines changed

3 files changed

+4
-39
lines changed

app/design/adminhtml/Magento/backend/Magento_Backend/layout/styles.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<?xml version="1.0"?>
22
<!--
33
/**
4-
* @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
4+
* Copyright © 2015 Magento. All rights reserved.
5+
* See COPYING.txt for license details.
56
*/
67
-->
78
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">

dev/tests/integration/testsuite/Magento/Persistent/Block/Header/AdditionalTest.php

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -54,28 +54,7 @@ public function setUp()
5454
public function testToHtml()
5555
{
5656
$this->_customerSession->loginById(1);
57-
/** @var \Magento\Customer\Helper\View $customerViewHelper */
58-
$customerViewHelper = $this->_objectManager->create(
59-
'Magento\Customer\Helper\View'
60-
);
61-
62-
/** @var \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository */
63-
$customerRepository = $this->_objectManager->create(
64-
'Magento\Customer\Api\CustomerRepositoryInterface'
65-
);
66-
/** @var \Magento\Framework\Escaper $escaper */
67-
$escaper = $this->_objectManager->create(
68-
'Magento\Framework\Escaper'
69-
);
70-
$persistentName = $escaper->escapeHtml(
71-
$customerViewHelper->getCustomerName(
72-
$customerRepository->getById(
73-
$this->_persistentSessionHelper->getSession()->getCustomerId()
74-
)
75-
)
76-
);
77-
78-
$translation = __('(Not %1?)', $persistentName);
57+
$translation = __('Not you?');
7958

8059
$this->assertStringMatchesFormat(
8160
'%A<span>%A<a%Ahref="' . $this->_block->getHref() . '"%A>' . $translation . '</a>%A</span>%A',

dev/tests/unit/testsuite/Magento/Persistent/Block/Header/AdditionalTest.php

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -323,22 +323,7 @@ public function testToHtml($customerId)
323323
[]
324324
);
325325

326-
$this->customerRepositoryMock->expects($this->once())
327-
->method('getById')
328-
->with($customerId)
329-
->willReturn($customerMock);
330-
331-
$this->customerViewHelperMock->expects($this->once())
332-
->method('getCustomerName')
333-
->with($customerMock)
334-
->willReturn($customerName);
335-
336-
$this->escaperMock->expects($this->at(0))
337-
->method('escapeHtml')
338-
->with($customerName)
339-
->willReturn($customerName);
340-
341-
$this->assertEquals('<span><a >(Not you?)</a></span>', $this->additional->toHtml());
326+
$this->assertEquals('<span><a >Not you?</a></span>', $this->additional->toHtml());
342327
} else {
343328
$this->assertEquals('', $this->additional->toHtml());
344329
}

0 commit comments

Comments
 (0)