@@ 58-69 (lines=12) @@ | ||
55 | /** |
|
56 | * @see https://github.com/silverstripe/silverstripe-blog/issues/376 |
|
57 | */ |
|
58 | public function testAllowMultibyteUrlSegment() |
|
59 | { |
|
60 | $blog = $this->objFromFixture('Blog', 'FirstBlog'); |
|
61 | $cat = new BlogCategory(); |
|
62 | $cat->BlogID = $blog->ID; |
|
63 | $cat->Title = 'تست'; |
|
64 | $cat->write(); |
|
65 | // urlencoded |
|
66 | $this->assertEquals('%D8%AA%D8%B3%D8%AA', $cat->URLSegment); |
|
67 | $link = Controller::join_links($cat->Blog()->Link(), 'category', '%D8%AA%D8%B3%D8%AA'); |
|
68 | $this->assertEquals($link, $cat->getLink()); |
|
69 | } |
|
70 | ||
71 | public function testCanView() |
|
72 | { |
@@ 58-69 (lines=12) @@ | ||
55 | /** |
|
56 | * @see https://github.com/silverstripe/silverstripe-blog/issues/376 |
|
57 | */ |
|
58 | public function testAllowMultibyteUrlSegment() |
|
59 | { |
|
60 | $blog = $this->objFromFixture('Blog', 'FirstBlog'); |
|
61 | $tag = new BlogTag(); |
|
62 | $tag->BlogID = $blog->ID; |
|
63 | $tag->Title = 'تست'; |
|
64 | $tag->write(); |
|
65 | // urlencoded |
|
66 | $this->assertEquals('%D8%AA%D8%B3%D8%AA', $tag->URLSegment); |
|
67 | $link = Controller::join_links($tag->Blog()->Link(), 'tag', '%D8%AA%D8%B3%D8%AA'); |
|
68 | $this->assertEquals($link, $tag->getLink()); |
|
69 | } |
|
70 | ||
71 | /** |
|
72 | * The first blog can be viewed by anybody. |