diff --git a/e107_tests/tests/unit/e107Test.php b/e107_tests/tests/unit/e107Test.php index 23d7d3090..48ed90d9d 100644 --- a/e107_tests/tests/unit/e107Test.php +++ b/e107_tests/tests/unit/e107Test.php @@ -791,6 +791,24 @@ class e107Test extends \Codeception\Test\Unit $result = $obj::url('news','index', array(), array('mode'=>'full')); $this->assertEquals("https://localhost/e107/news", $result); + + + $obj::getPlugin()->install('forum'); + $url = $obj::url('forum', 'topic', array(), array( + 'query' => array( + 'f' => 'post', + 'id' => 123 + ), + 'mode'=>'full' // suitable for URL redirect. eg. e107::redirect($url) + )); + + if(strpos($url,'http')!==0 || strpos($url, '&') !== false) + { + $this->fail("Generated 'full mode' URL contains ampersand entities or does not contain http"); + } + + + } /** @@ -810,6 +828,9 @@ class e107Test extends \Codeception\Test\Unit e_PLUGIN_ABS. 'forum/forum_viewtopic.php?f=post&id=123', $url, "Generated href does not match expectation" ); + + + } /* public function testRedirect()