Skip to content

Commit a7c32d0

Browse files
committed
Merge branch 'ACP2E-3367' of https://github.com/adobe-commerce-tier-4/magento2ce into PR-14-10-2024
2 parents a5a8fd8 + f4938e6 commit a7c32d0

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

app/code/Magento/Customer/Helper/View.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2014 Adobe
4+
* All Rights Reserved.
55
*/
66
namespace Magento\Customer\Helper;
77

@@ -68,6 +68,6 @@ public function getCustomerName(CustomerInterface $customerData)
6868
$name .= ' ' . __($customerData->getSuffix());
6969
}
7070

71-
return $this->escaper->escapeHtml($name);
71+
return $name;
7272
}
7373
}

app/code/Magento/Customer/Test/Unit/Helper/ViewTest.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2014 Adobe
4+
* All Rights Reserved.
55
*/
66
declare(strict_types=1);
77

@@ -54,9 +54,7 @@ protected function setUp(): void
5454
*/
5555
public function testGetCustomerName($prefix, $firstName, $middleName, $lastName, $suffix, $result)
5656
{
57-
$customerData = $this->getMockBuilder(CustomerInterface::class)
58-
->disableOriginalConstructor()
59-
->getMockForAbstractClass();
57+
$customerData = $this->createMock(CustomerInterface::class);
6058
$customerData->expects($this->any())
6159
->method('getPrefix')->willReturn($prefix);
6260
$customerData->expects($this->any())
@@ -67,7 +65,7 @@ public function testGetCustomerName($prefix, $firstName, $middleName, $lastName,
6765
->method('getLastname')->willReturn($lastName);
6866
$customerData->expects($this->any())
6967
->method('getSuffix')->willReturn($suffix);
70-
$this->escaperMock->expects($this->once())->method('escapeHtml')->with($result)->willReturn($result);
68+
$this->escaperMock->expects(self::never())->method('escapeHtml');
7169
$this->assertEquals($result, $this->object->getCustomerName($customerData));
7270
}
7371

dev/tests/integration/testsuite/Magento/Customer/Helper/ViewTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2014 Adobe
4+
* All Rights Reserved.
55
*/
66
namespace Magento\Customer\Helper;
77

@@ -132,7 +132,7 @@ public static function getCustomerNameDataProvider()
132132
)->setLastname(
133133
'<strong>LastName</strong>'
134134
),
135-
'&lt;h1&gt;FirstName&lt;/h1&gt; &lt;strong&gt;LastName&lt;/strong&gt;',
135+
'<h1>FirstName</h1> <strong>LastName</strong>',
136136
],
137137
];
138138
}

0 commit comments

Comments
 (0)