mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 09:05:58 +00:00
Fix unit test
This commit is contained in:
parent
91f89637bb
commit
5ef99a76a9
@ -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());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user