From b949b512e22c6ce14ff8808d4fd3f3bfbb467e6e Mon Sep 17 00:00:00 2001 From: Flavio Copes Date: Tue, 19 Jan 2016 11:18:22 +0100 Subject: [PATCH] Test Uri::param() --- tests/unit/Grav/Common/UriTest.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/unit/Grav/Common/UriTest.php b/tests/unit/Grav/Common/UriTest.php index 8d7ff051f..ba2f9d2be 100644 --- a/tests/unit/Grav/Common/UriTest.php +++ b/tests/unit/Grav/Common/UriTest.php @@ -182,6 +182,17 @@ class UriTest extends \Codeception\TestCase\Test $this->assertsame($uri->params('ueper'), null); } + public function testParam() + { + $uri = $this->getURI(); + + $uri->initializeWithURL('http://localhost:8080/grav/it/ueper:xxx')->init(); + $this->assertsame($uri->param('ueper'), 'xxx'); + $uri->initializeWithURL('http://localhost:8080/grav/it/ueper:xxx/test:yyy')->init(); + $this->assertsame($uri->param('ueper'), 'xxx'); + $this->assertsame($uri->param('test'), 'yyy'); + } +