| Name | Size | Mode | Actions |
|---|---|---|---|
| support/ | - | 0755 | rm |
| ArrayExtensionTest.php | 2035 | 0644 | editdlrm |
| DateExtensionTest.php | 4458 | 0644 | editdlrm |
| PcreExtensionTest.php | 4399 | 0644 | editdlrm |
| TextExtensionTest.php | 4986 | 0644 | editdlrm |
/var/www/vhosts/ihelp.ro/httpdocs/vendor/jasny/twig-extensions/tests/TextExtensionTest.php (4986B)
foo
\nbar
monkey
", "{{ 'foo\nbar\n\nmonkey'|paragraph() }}"); } public function testLine() { $this->assertRender("foo", "{{ 'foo\nbar\nbaz'|line() }}"); } public function testLineTwo() { $this->assertRender("bar", "{{ 'foo\nbar\nbaz'|line(2) }}"); } public function testLineToHigh() { $this->assertRender("", "{{ 'foo\nbar\nbaz'|line(100) }}"); } public function testLess() { $this->assertRender("foo...", "{{ 'foobaz'|less() }}"); } public function testLessCustom() { $this->assertRender("foo..", "{{ 'fooXbarXbaz'|less('..', 'X') }}"); } public function testLessNoPageBreak() { $this->assertRender("foo bar", "{{ 'foo bar'|less }}"); } public function testTruncate() { $this->assertRender("foo...", "{{ 'foo bar baz'|truncate(6) }}"); } public function testTruncateCustom() { $this->assertRender("foo ..", "{{ 'foo bar baz'|truncate(6, '..') }}"); } public function testTruncateToHigh() { $this->assertRender("foo bar baz", "{{ 'foo bar baz'|truncate(100) }}"); } public function testLinkify() { $this->assertRender( 'www.example.com, color.bar and ' . 'john@example.com', '{{ "www.example.com, color.bar and john@example.com"|linkify }}' ); } public function testLinkifyAll() { $this->assertRender( 'www.example.com, color.bar and ' . 'john@example.com', '{{ "www.example.com, color.bar and john@example.com"|linkify(["http", "mail"], [], "all") }}' ); } public function testLinkifyHttps() { $this->assertRender( 'www.example.com', '{{ "www.example.com"|linkify("https") }}' ); } public function testLinkifyMail() { $this->assertRender( 'john@example.com and ' . 'jeff@example.com', '{{ "john@example.com and jeff@example.com"|linkify }}' ); } public function testLinkifyFtp() { $this->assertRender( 'www.example.com', '{{ "ftp://www.example.com"|linkify("ftp") }}' ); } public function testLinkifyFtpAll() { $this->assertRender( 'www.example.com', '{{ "www.example.com"|linkify("ftp", [], "all") }}' ); } public function testLinkifyOther() { $this->assertRender( 'abc.def.hif', '{{ "foo:abc.def.hif"|linkify("foo") }}' ); } public function testLinkifyOtherAll() { $this->assertRender( 'abc.def.hif', '{{ "abc.def.hif"|linkify("foo", [], "all") }}' ); } public function testLinkifyWithAttributes() { $this->assertRender( 'www.example.com and ' . 'john@example.com', '{{ "www.example.com and john@example.com"|linkify(["http", "mail"], {foo: "bar", color: "blue"}) }}' ); } public function testLinkifyWithExistingLink() { $this->assertRender( 'www.example.com and ' . 'www.example.net', '{{ "www.example.com and www.example.net"|linkify }}' ); } public function filterProvider() { return [ ['paragraph'], ['line'], ['less'], ['truncate'], ['linkify'] ]; } /** * @dataProvider filterProvider * * @param string $filter */ public function testWithNull($filter) { $this->assertRender('-', '{{ null|' . $filter . '("//")|default("-") }}'); } }