Skip to content

Commit 41fbfbd

Browse files
author
Joan He
committed
Merge remote-tracking branch 'origin/MAGETWO-38380-all-store-code' into MAGETWO-43220-zf1
2 parents b35d0d7 + 2f4645c commit 41fbfbd

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

dev/tests/api-functional/framework/Magento/TestFramework/TestCase/Webapi/Adapter/Soap.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,14 @@ public function generateWsdlUrl($services, $storeCode = null)
122122
/** Sort list of services to avoid having different WSDL URLs for the identical lists of services. */
123123
//TODO: This may change since same resource of multiple versions may be allowed after namespace changes
124124
ksort($services);
125-
/** @var \Magento\Store\Model\StoreManagerInterface $storeManager */
126-
$storeCode = $storeCode !== null
127-
? (string)$storeCode
128-
: Bootstrap::getObjectManager()
125+
if ($storeCode == null) {
126+
$storeCode = Bootstrap::getObjectManager()
129127
->get('Magento\Store\Model\StoreManagerInterface')
130128
->getStore()
131129
->getCode();
130+
} elseif ($storeCode === \Magento\Webapi\Controller\PathProcessor::ALL_STORE_CODE) {
131+
$storeCode = \Magento\Store\Model\Store::ADMIN_CODE;
132+
}
132133

133134
/** TESTS_BASE_URL is initialized in PHPUnit configuration */
134135
$wsdlUrl = rtrim(TESTS_BASE_URL, '/') . self::WSDL_BASE_PATH . '/' . $storeCode . '?wsdl=1&services=';

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ public function testCreate($product)
144144
*/
145145
public function testCreateAllStoreCode($fixtureProduct)
146146
{
147-
$this->_markTestAsRestOnly();
148147
$response = $this->saveProduct($fixtureProduct, 'all');
149148
$this->assertArrayHasKey(ProductInterface::SKU, $response);
150149

@@ -174,7 +173,6 @@ public function testCreateAllStoreCode($fixtureProduct)
174173
*/
175174
public function testDeleteAllStoreCode($fixtureProduct)
176175
{
177-
$this->_markTestAsRestOnly();
178176
$sku = $fixtureProduct[ProductInterface::SKU];
179177
$this->saveProduct($fixtureProduct);
180178
$this->setExpectedException('Exception', 'Requested product doesn\'t exist');

0 commit comments

Comments
 (0)