mirror of
https://github.com/flextype/flextype.git
synced 2025-08-07 13:46:42 +02:00
fix(tests): fix tests for shortcodes
This commit is contained in:
@@ -90,15 +90,15 @@ test('(strings) shortcode', function () {
|
||||
$this->assertEquals(3632233996, parsers()->shortcodes()->parse("(strings crc32)test(/strings)"));
|
||||
|
||||
// endsWith
|
||||
$this->assertEquals("true", parsers()->shortcodes()->parse("(strings endsWith:"/")/movies/sg-1/season-5/episode-21/(/strings)"));
|
||||
$this->assertEquals("false", parsers()->shortcodes()->parse("(strings endsWith:"/")/movies/sg-1/season-5/episode-21(/strings)"));
|
||||
$this->assertEquals("true", parsers()->shortcodes()->parse("(strings endsWith:'/')/movies/sg-1/season-5/episode-21/(/strings)"));
|
||||
$this->assertEquals("false", parsers()->shortcodes()->parse("(strings endsWith:'/')/movies/sg-1/season-5/episode-21(/strings)"));
|
||||
|
||||
// finish
|
||||
$this->assertEquals("/movies/sg-1/season-5/episode-21/", parsers()->shortcodes()->parse("(strings finish:"/")/movies/sg-1/season-5/episode-21(/strings)"));
|
||||
|
||||
// firstSegment
|
||||
$this->assertEquals("SG-1", parsers()->shortcodes()->parse("(strings firstSegment)SG-1 returns from an off-world mission(/strings)"));
|
||||
$this->assertEquals("SG", parsers()->shortcodes()->parse("(strings firstSegment:"-")SG-1 returns from an off-world mission(/strings)"));
|
||||
$this->assertEquals("SG", parsers()->shortcodes()->parse("(strings firstSegment:'-')SG-1 returns from an off-world mission(/strings)"));
|
||||
|
||||
// format
|
||||
$this->assertEquals("There are 5 monkeys in the tree", parsers()->shortcodes()->parse("(strings format:'5,tree')There are %d monkeys in the %s(/strings)"));
|
||||
|
Reference in New Issue
Block a user