Merge pull request #395 from tractorcow/pulls/fix-widget-tests

BUG Tests don't work in non-root base url.
This commit is contained in:
Daniel Hensby 2016-05-20 20:52:43 +01:00
commit a587dcd612

View File

@ -35,25 +35,25 @@ class BlogTagsCloudWidgetTest extends SapphireTest {
$tag = $tags[0]; $tag = $tags[0];
$this->assertEquals('Cat', $tag->TagName); $this->assertEquals('Cat', $tag->TagName);
$this->assertEquals('/fourth-blog/tag/cat', $tag->Link); $this->assertEquals(Controller::join_links(Director::baseURL(), 'fourth-blog/tag/cat'), $tag->Link);
$this->assertEquals(2, $tag->TagCount); $this->assertEquals(2, $tag->TagCount);
$this->assertEquals(5, $tag->NormalizedTag); $this->assertEquals(5, $tag->NormalizedTag);
$tag = $tags[1]; $tag = $tags[1];
$this->assertEquals('Cool', $tag->TagName); $this->assertEquals('Cool', $tag->TagName);
$this->assertEquals('/fourth-blog/tag/cool', $tag->Link); $this->assertEquals(Controller::join_links(Director::baseURL(), 'fourth-blog/tag/cool'), $tag->Link);
$this->assertEquals(3, $tag->TagCount); $this->assertEquals(3, $tag->TagCount);
$this->assertEquals(8, $tag->NormalizedTag); $this->assertEquals(8, $tag->NormalizedTag);
$tag = $tags[2]; $tag = $tags[2];
$this->assertEquals('Kiwi', $tag->TagName); $this->assertEquals('Kiwi', $tag->TagName);
$this->assertEquals('/fourth-blog/tag/kiwi', $tag->Link); $this->assertEquals(Controller::join_links(Director::baseURL(), 'fourth-blog/tag/kiwi'), $tag->Link);
$this->assertEquals(1, $tag->TagCount); $this->assertEquals(1, $tag->TagCount);
$this->assertEquals(3, $tag->NormalizedTag); $this->assertEquals(3, $tag->NormalizedTag);
$tag = $tags[3]; $tag = $tags[3];
$this->assertEquals('Popular', $tag->TagName); $this->assertEquals('Popular', $tag->TagName);
$this->assertEquals('/fourth-blog/tag/popular', $tag->Link); $this->assertEquals(Controller::join_links(Director::baseURL(), 'fourth-blog/tag/popular'), $tag->Link);
$this->assertEquals(4, $tag->TagCount); $this->assertEquals(4, $tag->TagCount);
$this->assertEquals(10, $tag->NormalizedTag); $this->assertEquals(10, $tag->NormalizedTag);
} }