File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
lib/internal/Magento/Framework/View Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ public function renderHeadContent()
106
106
*/
107
107
public function renderTitle ()
108
108
{
109
- return '<title> ' . $ this ->pageConfig ->getTitle ()->get () . '</title> ' . "\n" ;
109
+ return '<title> ' . $ this ->escaper -> escapeHtml ( $ this -> pageConfig ->getTitle ()->get () ) . '</title> ' . "\n" ;
110
110
}
111
111
112
112
/**
Original file line number Diff line number Diff line change @@ -179,11 +179,15 @@ public function testRenderTitle()
179
179
180
180
$ this ->pageConfigMock ->expects ($ this ->any ())
181
181
->method ('getTitle ' )
182
- ->will ($ this ->returnValue ( $ this -> titleMock ) );
182
+ ->willReturn ($ this ->titleMock );
183
183
184
184
$ this ->titleMock ->expects ($ this ->once ())
185
185
->method ('get ' )
186
- ->will ($ this ->returnValue ($ title ));
186
+ ->willReturn ($ title );
187
+
188
+ $ this ->escaperMock ->expects ($ this ->once ())
189
+ ->method ('escapeHtml ' )
190
+ ->willReturnArgument (0 );
187
191
188
192
$ this ->assertEquals ($ expected , $ this ->renderer ->renderTitle ());
189
193
}
You can’t perform that action at this time.
0 commit comments