Skip to content

Commit 1378074

Browse files
committed
Revert "Customer related values are NULL for guests"
This reverts commit ccba420
1 parent b9a37ce commit 1378074

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

dev/tests/integration/testsuite/Magento/Store/Model/StoreTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,12 +267,24 @@ public function testIsCanDelete()
267267
$this->assertFalse($this->model->isCanDelete());
268268
}
269269

270+
/**
271+
* @magentoDataFixture Magento/Store/_files/second_store.php
272+
*/
270273
public function testGetCurrentUrl()
271274
{
272275
$this->model->load('admin');
273276
$this->model->expects($this->any())->method('getUrl')->will($this->returnValue('http://localhost/index.php'));
274277
$this->assertStringEndsWith('default', $this->model->getCurrentUrl());
275278
$this->assertStringEndsNotWith('default', $this->model->getCurrentUrl(false));
279+
280+
$this->model->load('fixture_second_store');
281+
282+
\Magento\TestFramework\Helper\Bootstrap::getObjectManager()
283+
->get(\Magento\Framework\App\Config\MutableScopeConfigInterface::class)
284+
->setValue(Store::XML_PATH_STORE_IN_URL, true, ScopeInterface::SCOPE_STORE);
285+
286+
$this->assertEquals('http://localhost/index.php?___store=fixture_second_store&___from_store=default', $this->model->getCurrentUrl(true));
287+
$this->assertEquals('http://localhost/index.php?___store=fixture_second_store', $this->model->getCurrentUrl(false));
276288
}
277289

278290
/**

0 commit comments

Comments
 (0)