Skip to content

Commit 81d2a17

Browse files
committed
fixed test
addressed review comments
1 parent 152c745 commit 81d2a17

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,10 @@ public function loadProductGalleryByAttributeId($product, $attributeId = null)
140140
/**
141141
* Create base load select
142142
*
143-
* Misleading method, methods relies on autoincrement field instead of entity ID
144-
*
145143
* @param int $entityId
146144
* @param int $storeId
147145
* @param int $attributeId
148-
* @deprecated
146+
* @deprecated Misleading method, methods relies on autoincrement field instead of entity ID
149147
* @return \Magento\Framework\DB\Select
150148
* @throws \Magento\Framework\Exception\LocalizedException
151149
* @since 101.0.0
@@ -196,7 +194,7 @@ public function getMediaRecords(int $storeId, array $entityIds, bool $preserveSo
196194
* @param int $attributeId
197195
* @return \Magento\Framework\DB\Select
198196
* @throws \Magento\Framework\Exception\LocalizedException
199-
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
197+
* @SuppressWarnings(PHPMD.UnusedFormalParameter) Media gallery doesn't support other attributes than media_galley
200198
* @since 101.0.1
201199
*/
202200
public function createBatchBaseSelect($storeId, $attributeId = null)

dev/tests/integration/testsuite/Magento/Csp/Model/Policy/Renderer/SimplePolicyHeaderRendererTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ public function testRenderRestrictMode(): void
5858
foreach ($header as $item) {
5959
$contentSecurityPolicyContent[] = $item->getFieldValue();
6060
}
61+
} else {
62+
$contentSecurityPolicyContent = [$header->getFieldValue()];
6163
}
6264
$this->assertEquals(['default-src https://magento.com \'self\';'], $contentSecurityPolicyContent);
6365
}
@@ -84,6 +86,8 @@ public function testRenderRestrictWithReportingMode(): void
8486
foreach ($header as $item) {
8587
$contentSecurityPolicyContent[] = $item->getFieldValue();
8688
}
89+
} else {
90+
$contentSecurityPolicyContent = [$header->getFieldValue()];
8791
}
8892
$this->assertEquals(
8993
['default-src https://magento.com \'self\'; report-uri /csp-reports/; report-to report-endpoint;'],

0 commit comments

Comments
 (0)