Fix unit test

This commit is contained in:
Damian Mooyman 2019-10-25 11:24:54 +13:00
parent 91f89637bb
commit 5ef99a76a9
No known key found for this signature in database
GPG Key ID: 19B1752E86A700BB
1 changed files with 3 additions and 2 deletions

View File

@ -61,14 +61,15 @@ class BlogTagTest extends FunctionalTest
*/ */
public function testAllowMultibyteUrlSegment() public function testAllowMultibyteUrlSegment()
{ {
/** @var Blog $blog */
$blog = $this->objFromFixture(Blog::class, 'FirstBlog'); $blog = $this->objFromFixture(Blog::class, 'FirstBlog');
$tag = new BlogTag(); $tag = new BlogTag();
$tag->BlogID = $blog->ID; $tag->setBlogID($blog->ID);
$tag->Title = 'تست'; $tag->Title = 'تست';
$tag->write(); $tag->write();
// urlencoded // urlencoded
$this->assertEquals('%D8%AA%D8%B3%D8%AA', $tag->URLSegment); $this->assertEquals('%D8%AA%D8%B3%D8%AA', $tag->URLSegment);
$link = Controller::join_links($tag->Blog()->Link(), 'tag', '%D8%AA%D8%B3%D8%AA'); $link = Controller::join_links($blog->Link(), 'tag', '%D8%AA%D8%B3%D8%AA');
$this->assertEquals($link, $tag->getLink()); $this->assertEquals($link, $tag->getLink());
} }