File tree Expand file tree Collapse file tree 3 files changed +4
-39
lines changed
app/design/adminhtml/Magento/backend/Magento_Backend/layout Expand file tree Collapse file tree 3 files changed +4
-39
lines changed Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" ?>
2
2
<!--
3
3
/**
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.
5
6
*/
6
7
-->
7
8
<page xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" ../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd" >
Original file line number Diff line number Diff line change @@ -54,28 +54,7 @@ public function setUp()
54
54
public function testToHtml ()
55
55
{
56
56
$ 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? ' );
79
58
80
59
$ this ->assertStringMatchesFormat (
81
60
'%A<span>%A<a%Ahref=" ' . $ this ->_block ->getHref () . '"%A> ' . $ translation . '</a>%A</span>%A ' ,
Original file line number Diff line number Diff line change @@ -323,22 +323,7 @@ public function testToHtml($customerId)
323
323
[]
324
324
);
325
325
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 ());
342
327
} else {
343
328
$ this ->assertEquals ('' , $ this ->additional ->toHtml ());
344
329
}
You can’t perform that action at this time.
0 commit comments