Skip to content

Commit 7e7d8e4

Browse files
committed
Change tag tests to use closing tags for testing
1 parent 254f6e4 commit 7e7d8e4

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

dev/tests/integration/testsuite/Magento/Csp/CspUtilTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function testPhtmlHelper(): void
3030
$content = $this->getResponse()->getContent();
3131

3232
$this->assertStringContainsString(
33-
'<script src="http&#x3A;&#x2F;&#x2F;my.magento.com&#x2F;static&#x2F;script.js"/>',
33+
'<script src="http&#x3A;&#x2F;&#x2F;my.magento.com&#x2F;static&#x2F;script.js"></script>',
3434
$content
3535
);
3636
$this->assertStringContainsString("<script>\n let myVar = 1;\n</script>", $content);

dev/tests/integration/testsuite/Magento/Csp/Helper/InlineUtilTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public function getTags(): array
9696
'script',
9797
['src' => 'http://magento.com/static/some-script.js'],
9898
null,
99-
'<script src="http&#x3A;&#x2F;&#x2F;magento.com&#x2F;static&#x2F;some-script.js"/>',
99+
'<script src="http&#x3A;&#x2F;&#x2F;magento.com&#x2F;static&#x2F;some-script.js"></script>',
100100
[new FetchPolicy('script-src', false, ['http://magento.com'])]
101101
],
102102
'inline-script' => [
@@ -209,7 +209,7 @@ public function getTags(): array
209209
'iframe',
210210
['src' => 'http://magento.com/some-page'],
211211
null,
212-
'<iframe src="http&#x3A;&#x2F;&#x2F;magento.com&#x2F;some-page"/>',
212+
'<iframe src="http&#x3A;&#x2F;&#x2F;magento.com&#x2F;some-page"></iframe>',
213213
[new FetchPolicy('frame-src', false, ['http://magento.com'])]
214214
],
215215
'remote-track' => [
@@ -230,21 +230,21 @@ public function getTags(): array
230230
'video',
231231
['src' => 'https://magento.com/static/video.mp4'],
232232
null,
233-
'<video src="https&#x3A;&#x2F;&#x2F;magento.com&#x2F;static&#x2F;video.mp4"/>',
233+
'<video src="https&#x3A;&#x2F;&#x2F;magento.com&#x2F;static&#x2F;video.mp4"></video>',
234234
[new FetchPolicy('media-src', false, ['https://magento.com'])]
235235
],
236236
'remote-audio' => [
237237
'audio',
238238
['src' => 'https://magento.com/static/audio.mp3'],
239239
null,
240-
'<audio src="https&#x3A;&#x2F;&#x2F;magento.com&#x2F;static&#x2F;audio.mp3"/>',
240+
'<audio src="https&#x3A;&#x2F;&#x2F;magento.com&#x2F;static&#x2F;audio.mp3"></audio>',
241241
[new FetchPolicy('media-src', false, ['https://magento.com'])]
242242
],
243243
'remote-object' => [
244244
'object',
245245
['data' => 'http://magento.com/static/flash.swf'],
246246
null,
247-
'<object data="http&#x3A;&#x2F;&#x2F;magento.com&#x2F;static&#x2F;flash.swf"/>',
247+
'<object data="http&#x3A;&#x2F;&#x2F;magento.com&#x2F;static&#x2F;flash.swf"></object>',
248248
[new FetchPolicy('object-src', false, ['http://magento.com'])]
249249
],
250250
'remote-embed' => [
@@ -259,7 +259,7 @@ public function getTags(): array
259259
['code' => 'SomeApplet.class', 'archive' => 'https://magento.com/applet/my-applet.jar'],
260260
null,
261261
'<applet code="SomeApplet.class" '
262-
. 'archive="https&#x3A;&#x2F;&#x2F;magento.com&#x2F;applet&#x2F;my-applet.jar"/>',
262+
. 'archive="https&#x3A;&#x2F;&#x2F;magento.com&#x2F;applet&#x2F;my-applet.jar"></applet>',
263263
[new FetchPolicy('object-src', false, ['https://magento.com'])]
264264
]
265265
];
@@ -294,7 +294,7 @@ public function testSecureHtmlRenderer(): void
294294
$eventListener = $this->secureHtmlRenderer->renderEventListener('onclick', 'alert()');
295295

296296
$this->assertEquals(
297-
'<script src="https&#x3A;&#x2F;&#x2F;test.magento.com&#x2F;static&#x2F;script.js"/>',
297+
'<script src="https&#x3A;&#x2F;&#x2F;test.magento.com&#x2F;static&#x2F;script.js"></script>',
298298
$scriptTag
299299
);
300300
$this->assertEquals(

dev/tests/integration/testsuite/Magento/Framework/View/Helper/SecureHtmlRendererTemplateTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function testTemplateUsage(): void
3333
$content
3434
);
3535
$this->assertStringContainsString(
36-
'<script src="http&#x3A;&#x2F;&#x2F;my.magento.com&#x2F;static&#x2F;script.js"/>',
36+
'<script src="http&#x3A;&#x2F;&#x2F;my.magento.com&#x2F;static&#x2F;script.js"></script>',
3737
$content
3838
);
3939
$this->assertStringContainsString(

0 commit comments

Comments
 (0)