Skip to content

Commit 1ab6417

Browse files
pradeep.rauthanpradeep.rauthan
authored andcommitted
ACP2E-159: Getting RegionID issue in backoffice for Create Order - Unit test coverage
1 parent dd7dabd commit 1ab6417

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

app/code/Magento/Directory/Test/Unit/Helper/DataTest.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,4 +294,26 @@ public function topCountriesDataProvider()
294294
['US,RU', ['US', 'RU']],
295295
];
296296
}
297+
298+
/**
299+
* @throws \ReflectionException
300+
*/
301+
public function testGetCurrentScopeWithoutRequestParameters()
302+
{
303+
$storeId = 1;
304+
$scope = [
305+
'type' => ScopeInterface::SCOPE_STORE,
306+
'value' => $storeId,
307+
];
308+
309+
$this->_store->expects($this->atLeastOnce())->method('getId')->willReturn($storeId);
310+
311+
$reflector = new \ReflectionClass($this->_object);
312+
$method = $reflector->getMethod('getCurrentScope');
313+
$method->setAccessible(true);
314+
315+
$result = $method->invoke($this->_object);
316+
$this->assertIsArray($result);
317+
$this->assertEquals($scope, $result);
318+
}
297319
}

0 commit comments

Comments
 (0)