Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit 1412d2c

Browse files
committed
Fix html link test not having href attrib
1 parent a44e7cd commit 1412d2c

File tree

1 file changed

+4
-3
lines changed
  • lib/internal/Magento/Framework/View/Test/Unit/Element/Html

1 file changed

+4
-3
lines changed

lib/internal/Magento/Framework/View/Test/Unit/Element/Html/LinkTest.php

+4-3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ class LinkTest extends \PHPUnit\Framework\TestCase
1111
* @var array
1212
*/
1313
protected $allowedAttributes = [
14+
'href',
1415
'shape',
1516
'tabindex',
1617
'onfocus',
@@ -51,7 +52,7 @@ public function getLinkAttributesDataProvider()
5152

5253
$urlBuilderMock->expects($this->any())
5354
->method('getUrl')
54-
->will($this->returnArgument('http://site.com/link.html'));
55+
->will($this->returnValue('http://site.com/link.html'));
5556

5657
$validtorMock = $this->getMockBuilder(\Magento\Framework\View\Element\Template\File\Validator::class)
5758
->setMethods(['isValid'])->disableOriginalConstructor()->getMock();
@@ -105,11 +106,11 @@ public function getLinkAttributesDataProvider()
105106
return [
106107
'full' => [
107108
'link' => $linkWithAttributes,
108-
'expected' => 'shape="shape" tabindex="tabindex" onfocus="onfocus" onblur="onblur" id="id"',
109+
'expected' => 'href="http://site.com/link.html" shape="shape" tabindex="tabindex" onfocus="onfocus" onblur="onblur" id="id"',
109110
],
110111
'empty' => [
111112
'link' => $linkWithoutAttributes,
112-
'expected' => '',
113+
'expected' => 'href="http://site.com/link.html"',
113114
],
114115
];
115116
}

0 commit comments

Comments
 (0)