Definition at line 10 of file RequestTest.php.
◆ setUp()
Definition at line 17 of file RequestTest.php.
19 $this->_model = new \Magento\TestFramework\Request(
20 $this->createMock(\
Magento\Framework\Stdlib\Cookie\CookieReaderInterface::class),
21 $this->createMock(\
Magento\Framework\Stdlib\StringUtils::class),
22 $this->createMock(\
Magento\Framework\
App\Route\ConfigInterface\Proxy::class),
23 $this->createMock(\
Magento\Framework\
App\Request\PathInfoProcessorInterface::class),
24 $this->createMock(\
Magento\Framework\ObjectManagerInterface::class)
◆ testGetHttpHost()
Definition at line 28 of file RequestTest.php.
30 $this->assertEquals(
'localhost', $this->_model->getHttpHost());
31 $this->assertEquals(
'localhost:81', $this->_model->getHttpHost(
false));
◆ testSetGetServerValue()
testSetGetServerValue |
( |
| ) |
|
Definition at line 34 of file RequestTest.php.
36 $this->_model->setServer(
new Parameters([]));
37 $this->assertSame([], $this->_model->getServer()->toArray());
40 $this->_model->setServer(
new Parameters([
'test' =>
'value',
'null' =>
null]))
42 $this->assertSame([
'test' =>
'value',
'null' =>
null], $this->_model->getServer()->toArray());
43 $this->assertEquals(
'value', $this->_model->getServer(
'test'));
44 $this->assertSame(
null, $this->_model->getServer(
'non-existing'));
45 $this->assertSame(
'default', $this->_model->getServer(
'non-existing',
'default'));
46 $this->assertSame(
null, $this->_model->getServer(
'null'));
◆ $_model
The documentation for this class was generated from the following file:
- vendor/magento/magento2-base/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/RequestTest.php