Skip to content

Commit 048ada3

Browse files
committed
MC-40068: Create automated test for: "Try to delete root category by API call"
1 parent 2740e08 commit 048ada3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

dev/tests/api-functional/testsuite/Magento/Catalog/Api/CategoryRepositoryTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,9 @@ private function buildExceptionMessage(int $categoryId): string
224224
{
225225
$translatedMsg = (string)__('Cannot delete category with id %1');
226226

227-
return sprintf('{"message":"%s","parameters":["%u"]}', $translatedMsg, $categoryId);
227+
return TESTS_WEB_API_ADAPTER === self::ADAPTER_REST
228+
? sprintf('{"message":"%s","parameters":["%u"]}', $translatedMsg, $categoryId)
229+
: $translatedMsg;
228230
}
229231

230232
/**

0 commit comments

Comments
 (0)