Definition at line 14 of file FrontNameResolverTest.php.
◆ hostsDataProvider()
- Returns
- array
Definition at line 124 of file FrontNameResolverTest.php.
128 'url' =>
'http://magento2.loc/',
129 'host' =>
'magento2.loc',
130 'useCustomAdminUrl' =>
'0',
131 'customAdminUrl' =>
'',
132 'expectedValue' => true
135 'url' =>
'http://magento2.loc:8080/',
136 'host' =>
'magento2.loc:8080',
137 'useCustomAdminUrl' =>
'0',
138 'customAdminUrl' =>
'',
139 'expectedValue' => true
141 'withStandartPortInUrlWithoutPortInHost' => [
142 'url' =>
'http://magento2.loc:80/',
143 'host' =>
'magento2.loc',
144 'useCustomAdminUrl' =>
'0',
145 'customAdminUrl' =>
'',
146 'expectedValue' => true
148 'withoutStandartPortInUrlWithPortInHost' => [
149 'url' =>
'https://magento2.loc/',
150 'host' =>
'magento2.loc:443',
151 'useCustomAdminUrl' =>
'0',
152 'customAdminUrl' =>
'',
153 'expectedValue' => true
155 'differentHosts' => [
156 'url' =>
'http://m2.loc/',
157 'host' =>
'magento2.loc',
158 'useCustomAdminUrl' =>
'0',
159 'customAdminUrl' =>
'',
160 'expectedValue' =>
false 162 'differentPortsOnOneHost' => [
163 'url' =>
'http://magento2.loc/',
164 'host' =>
'magento2.loc:8080',
165 'useCustomAdminUrl' =>
'0',
166 'customAdminUrl' =>
'',
167 'expectedValue' =>
false 169 'withCustomAdminUrl' => [
170 'url' =>
'http://magento2.loc/',
171 'host' =>
'myhost.loc',
172 'useCustomAdminUrl' =>
'1',
173 'customAdminUrl' =>
'https://myhost.loc/',
174 'expectedValue' => true
176 'withCustomAdminUrlWrongHost' => [
177 'url' =>
'http://magento2.loc/',
178 'host' =>
'SomeOtherHost.loc',
179 'useCustomAdminUrl' =>
'1',
180 'customAdminUrl' =>
'https://myhost.loc/',
181 'expectedValue' =>
false
◆ testIfCustomPathNotUsed()
testIfCustomPathNotUsed |
( |
| ) |
|
Definition at line 72 of file FrontNameResolverTest.php.
74 $this->configMock->expects(
79 'admin/url/use_custom_path' 81 $this->returnValue(
false)
83 $this->assertEquals($this->_defaultFrontName, $this->model->getFrontName());
◆ testIfCustomPathUsed()
Definition at line 49 of file FrontNameResolverTest.php.
51 $this->configMock->expects(
56 'admin/url/use_custom_path' 58 $this->returnValue(
true)
60 $this->configMock->expects(
65 'admin/url/custom_path' 67 $this->returnValue(
'expectedValue')
69 $this->assertEquals(
'expectedValue', $this->model->getFrontName());
◆ testIsHostBackend()
testIsHostBackend |
( |
|
$url, |
|
|
|
$host, |
|
|
|
$useCustomAdminUrl, |
|
|
|
$customAdminUrl, |
|
|
|
$expectedValue |
|
) |
| |
- Parameters
-
string | $url | |
string | $host | |
string | $useCustomAdminUrl | |
string | $customAdminUrl | |
string | $expectedValue | @dataProvider hostsDataProvider |
Definition at line 94 of file FrontNameResolverTest.php.
96 $_SERVER[
'HTTP_HOST'] = $host;
97 $this->scopeConfigMock->expects($this->exactly(2))
100 $this->returnValueMap(
118 $this->assertEquals($this->model->isHostBackend(), $expectedValue);
const XML_PATH_USE_CUSTOM_ADMIN_URL
const XML_PATH_UNSECURE_BASE_URL
const XML_PATH_CUSTOM_ADMIN_URL
◆ $_defaultFrontName
$_defaultFrontName = 'defaultFrontName' |
|
protected |
◆ $configMock
◆ $model
◆ $scopeConfigMock
The documentation for this class was generated from the following file: