/** * */ public function testForeachNoNewLines() { $templateString = <<<'TPL' {$foo = [1, 2, 3]} {foreach $foo as $bar} {$bar} {/foreach} TPL; $cacheID = "testForeachNoNewLines/testForeachNoNewLines" . time(); $output = $this->jigDispatcher->renderTemplateFromString($templateString, $cacheID); $this->assertContains("1\n2\n3\n", $output); $output = $this->jigDispatcher->renderTemplateFile('bugs/foreachNewLines_12'); $this->assertContains("1\n2\n3\n", $output); }
public function testBlocksInsideLiteral() { $contents = $this->jig->renderTemplateFile('bugs/blocksInsideLiteral'); $this->assertContains("{trim}\n{/trim}", $contents); }
public function testcheckNoExtraLines() { $contents = $this->jig->renderTemplateFile('block/checkNoExtraLines'); $this->assertEquals(4, count(explode("\n", $contents)), "Rendering is inserting extra lines."); }