Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit 6b3e090

Browse files
committed
ensure topic is always lower case
1 parent 0fe2795 commit 6b3e090

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

app/code/Magento/WebapiAsync/Model/Config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ private function generateLookupKeyByRouteData($routeUrl, $httpMethod)
158158
private function generateTopicNameFromService($serviceInterface, $serviceMethod, $httpMethod)
159159
{
160160
$typeName = strtolower(sprintf('%s.%s', $serviceInterface, $serviceMethod));
161-
return self::TOPIC_PREFIX . $this->generateKey($typeName, $httpMethod, '\\', false);
161+
return strtolower(self::TOPIC_PREFIX . $this->generateKey($typeName, $httpMethod, '\\', false));
162162
}
163163

164164
/**

app/code/Magento/WebapiAsync/Test/Unit/Model/ConfigTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,13 @@ public function testGetServicesSetsTopicFromServiceContractName()
7777
'async.V1.products.POST' => [
7878
'interface' => 'Magento\Catalog\Api\ProductRepositoryInterface',
7979
'method' => 'save',
80-
'topic' => 'async.magento.catalog.api.productrepositoryinterface.save.POST',
80+
'topic' => 'async.magento.catalog.api.productrepositoryinterface.save.post',
8181
]
8282
];
8383
*/
8484
$result = $this->config->getServices();
8585

86-
$expectedTopic = 'async.magento.catalog.api.productrepositoryinterface.save.POST';
86+
$expectedTopic = 'async.magento.catalog.api.productrepositoryinterface.save.post';
8787
$lookupKey = 'async.V1.products.POST';
8888
$this->assertArrayHasKey($lookupKey, $result);
8989
$this->assertEquals($result[$lookupKey]['topic'], $expectedTopic);

dev/tests/integration/testsuite/Magento/AsynchronousOperations/Model/MassScheduleTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public function sendBulk($products)
128128
}
129129
$this->clearProducts();
130130

131-
$result = $this->massSchedule->publishMass('async.magento.catalog.api.productrepositoryinterface.save.POST', $products);
131+
$result = $this->massSchedule->publishMass('async.magento.catalog.api.productrepositoryinterface.save.post', $products);
132132

133133
//assert bulk accepted with no errors
134134
$this->assertFalse($result->isErrors());
@@ -206,7 +206,7 @@ public function testScheduleMassOneEntityFailure($products)
206206

207207
$expectedErrorMessage = "Data item corresponding to \"product\" " .
208208
"must be specified in the message with topic " .
209-
"\"async.magento.catalog.api.productrepositoryinterface.save.POST\".";
209+
"\"async.magento.catalog.api.productrepositoryinterface.save.post\".";
210210
$this->assertEquals(
211211
$expectedErrorMessage,
212212
$reasonException->getMessage()

0 commit comments

Comments
 (0)