Skip to content

Commit

Permalink
#22296: Integration test fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
engcom-Foxtrot committed Oct 7, 2019
1 parent 48f213d commit 6458cc8
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function testGetUrlInStore()
* @magentoConfigFixture fixturestore_store web/unsecure/base_url http://sample-second.com/
* @magentoConfigFixture fixturestore_store web/unsecure/base_link_url http://sample-second.com/
* @magentoDataFixture Magento/Catalog/_files/product_simple_multistore.php
* @magentoDbIsolation disabled
* @magentoDbIsolation enabled
* @dataProvider getUrlsWithSecondStoreProvider
* @magentoAppArea adminhtml
*/
Expand Down
36 changes: 20 additions & 16 deletions dev/tests/integration/testsuite/Magento/Store/Model/StoreTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,13 @@ public function getBaseUrlDataProvider()
*/
public function testGetBaseUrlInPub()
{
\Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize([
Bootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS => [
DirectoryList::PUB => [DirectoryList::URL_PATH => ''],
],
]);
\Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(
[
Bootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS => [
DirectoryList::PUB => [DirectoryList::URL_PATH => ''],
],
]
);

$this->model = $this->_getStoreModel();
$this->model->load('default');
Expand Down Expand Up @@ -283,7 +285,7 @@ public function testGetCurrentUrl()
{
$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
$objectManager->get(\Magento\Framework\App\Config\MutableScopeConfigInterface::class)
->setValue('web/url/use_store', true, ScopeInterface::SCOPE_STORE, 'secondstore');
->setValue('web/url/use_store', true, ScopeInterface::SCOPE_STORE, 'secondstore');

$this->model->load('admin');
$this->model
Expand Down Expand Up @@ -318,7 +320,7 @@ public function testGetCurrentUrl()
/**
* @magentoDataFixture Magento/Store/_files/second_store.php
* @magentoDataFixture Magento/Catalog/_files/category_product.php
* @magentoDbIsolation disabled
* @magentoDbIsolation enabled
*/
public function testGetCurrentUrlWithUseStoreInUrlFalse()
{
Expand Down Expand Up @@ -366,14 +368,16 @@ public function testGetCurrentUrlWithUseStoreInUrlFalse()
*/
public function testCRUD()
{
$this->model->setData([
'code' => 'test',
'website_id' => 1,
'group_id' => 1,
'name' => 'test name',
'sort_order' => 0,
'is_active' => 1,
]);
$this->model->setData(
[
'code' => 'test',
'website_id' => 1,
'group_id' => 1,
'name' => 'test name',
'sort_order' => 0,
'is_active' => 1,
]
);
$crud = new \Magento\TestFramework\Entity(
$this->model,
['name' => 'new name'],
Expand Down Expand Up @@ -446,8 +450,8 @@ public function testIsUseStoreInUrl($storeInUrl, $disableStoreInUrl, $expectedRe
}

/**
* @see self::testIsUseStoreInUrl;
* @return array
* @see self::testIsUseStoreInUrl;
*/
public function isUseStoreInUrlDataProvider()
{
Expand Down

0 comments on commit 6458cc8

Please sign in to comment.