Skip to content

Commit c9eca21

Browse files
committed
EWPP-4015: Enable disable phpcs rule.
1 parent 3225d7d commit c9eca21

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

modules/oe_media_avportal/src/Plugin/views/query/AVPortalQuery.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ class AVPortalQuery extends QueryPluginBase {
4343
/**
4444
* AV Portal client factory.
4545
*
46+
* phpcs:enable Drupal.NamingConventions.ValidVariableName.LowerCamelName
47+
*
4648
* @var \Drupal\media_avportal\AvPortalClientFactory
4749
*/
4850
protected $clientFactory;

modules/oe_media_iframe/tests/src/Kernel/OeMediaIframeFormatTest.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,16 @@ protected function providerTestFormat(): array {
7373
],
7474
'EbS Live embed code' => [
7575
'html' => '<iframe src="http://web:8080/tests/fixtures/example.html" id="videoplayer" width="852" height="480" title="" frameborder="0" scrolling="no" webkitAllowFullScreen="true" mozallowfullscreen="true" allowFullScreen="true"></iframe>',
76-
'expected' => $higher_core_version ? '<iframe src="http://web:8080/tests/fixtures/example.html" width="852" height="480" title frameborder="0" scrolling="no" webkitallowfullscreen="true" mozallowfullscreen="true" allowfullscreen="true"></iframe>' : '<iframe src="http://web:8080/tests/fixtures/example.html" width="852" height="480" title="" frameborder="0" scrolling="no" webkitallowfullscreen="true" mozallowfullscreen="true" allowfullscreen="true"></iframe>',
76+
'expected' => $higher_core_version
77+
? '<iframe src="http://web:8080/tests/fixtures/example.html" width="852" height="480" title frameborder="0" scrolling="no" webkitallowfullscreen="true" mozallowfullscreen="true" allowfullscreen="true"></iframe>'
78+
: '<iframe src="http://web:8080/tests/fixtures/example.html" width="852" height="480" title="" frameborder="0" scrolling="no" webkitallowfullscreen="true" mozallowfullscreen="true" allowfullscreen="true"></iframe>',
7779
],
7880
'iframe with all existing iframe attributes' => [
7981
// Lang and dir attributes are always allowed.
8082
'html' => '<iframe src="http://web:8080/tests/fixtures/example.html" width="800" height="600" frameborder="0" allow allowfullscreen allowpaymentrequest csp importance loading referrerpolicy sandbox srcdoc mozallowfullscreen webkitAllowFullScreen scrolling accesskey autocapitalize class contenteditable data-test data-test2 dir draggable dropzone exportparts hidden id inputmode is itemid itemprop itemref itemscope itemtype lang part slot spellcheck style tabindex title translate></iframe>',
81-
'expected' => $higher_core_version ? '<iframe src="http://web:8080/tests/fixtures/example.html" width="800" height="600" frameborder="0" allowfullscreen importance loading referrerpolicy sandbox mozallowfullscreen webkitallowfullscreen scrolling lang title></iframe>' : '<iframe src="http://web:8080/tests/fixtures/example.html" width="800" height="600" frameborder="0" allowfullscreen="" importance="" loading="" referrerpolicy="" sandbox="" mozallowfullscreen="" webkitallowfullscreen="" scrolling="" lang="" title="" xml:lang="" xml:lang=""></iframe>',
83+
'expected' => $higher_core_version
84+
? '<iframe src="http://web:8080/tests/fixtures/example.html" width="800" height="600" frameborder="0" allowfullscreen importance loading referrerpolicy sandbox mozallowfullscreen webkitallowfullscreen scrolling lang title></iframe>'
85+
: '<iframe src="http://web:8080/tests/fixtures/example.html" width="800" height="600" frameborder="0" allowfullscreen="" importance="" loading="" referrerpolicy="" sandbox="" mozallowfullscreen="" webkitallowfullscreen="" scrolling="" lang="" title="" xml:lang="" xml:lang=""></iframe>',
8286
],
8387
'iframe with invalid attribute' => [
8488
'html' => '<iframe src="http://web:8080/tests/fixtures/example.html" width="800" height="600" frameborder="0" invalid-attribute="with random value"></iframe>',

modules/oe_media_iframe/tests/src/Unit/FilterIframeTagTest.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,21 @@ public function processDataProvider(): array {
6060
],
6161
'nested tags' => [
6262
'<iframe src="http://example.com"><a href="http://dangerous-domain.example">Click here!</a>Please enable iframes in your browser.</iframe>',
63-
$higher_core_version ? '<iframe src="http://example.com">&lt;a href="http://dangerous-domain.example"&gt;Click here!&lt;/a&gt;Please enable iframes in your browser.</iframe>' : '<iframe src="http://example.com">Please enable iframes in your browser.</iframe>',
63+
$higher_core_version
64+
? '<iframe src="http://example.com">&lt;a href="http://dangerous-domain.example"&gt;Click here!&lt;/a&gt;Please enable iframes in your browser.</iframe>'
65+
: '<iframe src="http://example.com">Please enable iframes in your browser.</iframe>',
6466
],
6567
'nested iframes' => [
6668
'<iframe src="http://example.com/first"><iframe src="http://example.com/second">Inner content.</iframe>Useful content.</iframe>',
67-
$higher_core_version ? '<iframe src="http://example.com/first">&lt;iframe src="http://example.com/second"&gt;Inner content.</iframe>' : '<iframe src="http://example.com/first">Useful content.</iframe>',
69+
$higher_core_version
70+
? '<iframe src="http://example.com/first">&lt;iframe src="http://example.com/second"&gt;Inner content.</iframe>'
71+
: '<iframe src="http://example.com/first">Useful content.</iframe>',
6872
],
6973
'multiple text content' => [
7074
'<iframe src="http://example.com">First node <strong>remove</strong> second node <em>remove</em>.</iframe>',
71-
$higher_core_version ? '<iframe src="http://example.com">First node &lt;strong&gt;remove&lt;/strong&gt; second node &lt;em&gt;remove&lt;/em&gt;.</iframe>' : '<iframe src="http://example.com">First node second node .</iframe>',
75+
$higher_core_version
76+
? '<iframe src="http://example.com">First node &lt;strong&gt;remove&lt;/strong&gt; second node &lt;em&gt;remove&lt;/em&gt;.</iframe>'
77+
: '<iframe src="http://example.com">First node second node .</iframe>',
7278
],
7379
'extra HTML content with iframe' => [
7480
'Lorem ipsum dolor sit amet<iframe src="http://example.com"></iframe><p>Consectetur adipiscing elit</p>Ut finibus vulputate fringilla.',

0 commit comments

Comments
 (0)