Skip to content

Commit 6a8fc70

Browse files
author
Sergey Semenov
committed
MAGETWO-33073: Upgrade request class.
1 parent 6ac0a45 commit 6a8fc70

File tree

1 file changed

+26
-0
lines changed
  • dev/tests/unit/testsuite/Magento/Framework/HTTP/PhpEnvironment

1 file changed

+26
-0
lines changed

dev/tests/unit/testsuite/Magento/Framework/HTTP/PhpEnvironment/RequestTest.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,4 +173,30 @@ public function testGetFiles()
173173
$this->assertNull($this->model->getFiles('no_such_file'));
174174
$this->assertEquals('default', $this->model->getFiles('no_such_file', 'default'));
175175
}
176+
177+
public function testGetBaseUrlWithUrl()
178+
{
179+
$this->model = $this->getModel();
180+
$this->model->setBaseUrl('http://test.com/one/two');
181+
$this->assertEquals('http://test.com/one/two', $this->model->getBaseUrl());
182+
}
183+
184+
public function testGetBaseUrlWithEmptyUrl()
185+
{
186+
$this->model = $this->getModel();
187+
$this->assertEmpty($this->model->getBaseUrl());
188+
}
189+
190+
public function testGetAliasWhenAliasSet()
191+
{
192+
$this->model = $this->getModel();
193+
$this->model->setAlias('AliasName', 'AliasTarget');
194+
$this->assertEquals('AliasTarget', $this->model->getAlias('AliasName'));
195+
}
196+
197+
public function testGetAliasWhenAliasAreEmpty()
198+
{
199+
$this->model = $this->getModel();
200+
$this->assertNull($this->model->getAlias(''));
201+
}
176202
}

0 commit comments

Comments
 (0)