summaryrefslogtreecommitdiff
path: root/tests/units/Helper/UrlHelperTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/units/Helper/UrlHelperTest.php')
-rw-r--r--tests/units/Helper/UrlHelperTest.php24
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/units/Helper/UrlHelperTest.php b/tests/units/Helper/UrlHelperTest.php
index 15e01237..34ab7604 100644
--- a/tests/units/Helper/UrlHelperTest.php
+++ b/tests/units/Helper/UrlHelperTest.php
@@ -2,7 +2,7 @@
require_once __DIR__.'/../Base.php';
-use Kanboard\Helper\Url;
+use Kanboard\Helper\UrlHelper;
use Kanboard\Model\Config;
use Kanboard\Core\Http\Request;
@@ -10,7 +10,7 @@ class UrlHelperTest extends Base
{
public function testPluginLink()
{
- $h = new Url($this->container);
+ $h = new UrlHelper($this->container);
$this->assertEquals(
'<a href="?controller=a&amp;action=b&amp;d=e&amp;plugin=something" class="f" title=\'g\' target="_blank">label</a>',
$h->link('label', 'a', 'b', array('d' => 'e', 'plugin' => 'something'), false, 'f', 'g', true)
@@ -22,7 +22,7 @@ class UrlHelperTest extends Base
$this->container['route']->enable();
$this->container['route']->addRoute('/myplugin/something/:d', 'a', 'b', 'something');
- $h = new Url($this->container);
+ $h = new UrlHelper($this->container);
$this->assertEquals(
'<a href="myplugin/something/e" class="f" title=\'g\' target="_blank">label</a>',
$h->link('label', 'a', 'b', array('d' => 'e', 'plugin' => 'something'), false, 'f', 'g', true)
@@ -31,7 +31,7 @@ class UrlHelperTest extends Base
public function testAppLink()
{
- $h = new Url($this->container);
+ $h = new UrlHelper($this->container);
$this->assertEquals(
'<a href="?controller=a&amp;action=b&amp;d=e" class="f" title=\'g\' target="_blank">label</a>',
$h->link('label', 'a', 'b', array('d' => 'e'), false, 'f', 'g', true)
@@ -40,7 +40,7 @@ class UrlHelperTest extends Base
public function testHref()
{
- $h = new Url($this->container);
+ $h = new UrlHelper($this->container);
$this->assertEquals(
'?controller=a&amp;action=b&amp;d=e',
$h->href('a', 'b', array('d' => 'e'))
@@ -49,7 +49,7 @@ class UrlHelperTest extends Base
public function testTo()
{
- $h = new Url($this->container);
+ $h = new UrlHelper($this->container);
$this->assertEquals(
'?controller=a&action=b&d=e',
$h->to('a', 'b', array('d' => 'e'))
@@ -64,7 +64,7 @@ class UrlHelperTest extends Base
)
);
- $h = new Url($this->container);
+ $h = new UrlHelper($this->container);
$this->assertEquals('/kanboard/', $h->dir());
$this->container['request'] = new Request($this->container, array(
@@ -73,7 +73,7 @@ class UrlHelperTest extends Base
)
);
- $h = new Url($this->container);
+ $h = new UrlHelper($this->container);
$this->assertEquals('/', $h->dir());
}
@@ -87,7 +87,7 @@ class UrlHelperTest extends Base
)
);
- $h = new Url($this->container);
+ $h = new UrlHelper($this->container);
$this->assertEquals('http://localhost/', $h->server());
$this->container['request'] = new Request($this->container, array(
@@ -98,7 +98,7 @@ class UrlHelperTest extends Base
)
);
- $h = new Url($this->container);
+ $h = new UrlHelper($this->container);
$this->assertEquals('http://kb:1234/', $h->server());
}
@@ -112,14 +112,14 @@ class UrlHelperTest extends Base
)
);
- $h = new Url($this->container);
+ $h = new UrlHelper($this->container);
$this->assertEquals('http://kb:1234/', $h->base());
$c = new Config($this->container);
$c->save(array('application_url' => 'https://mykanboard/'));
$this->container['memoryCache']->flush();
- $h = new Url($this->container);
+ $h = new UrlHelper($this->container);
$this->assertEquals('https://mykanboard/', $c->get('application_url'));
$this->assertEquals('https://mykanboard/', $h->base());
}