Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,6 @@ public function dataTestSpacing()
*/
public function testInlineStringInclude()
{
$this->assertEquals('include-inline', $this->smarty->fetch('inline_string_include.tpl'));
$this->assertEquals("include-inline\n", $this->smarty->fetch('inline_string_include.tpl'));
}
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{include "string:include-inline" inline}
{include "string:include-inline\n" inline}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php
/**
* Smarty PHPunit tests compiler errors
*
* @package PHPunit
* @author Uwe Tews
*/

/**
* class for compiler tests
*
* @runTestsInSeparateProcess
* @preserveGlobalState disabled
* @backupStaticAttributes enabled
*
* Switching from block to inline include crashes render
*/
class IncludeBlockToInlineIssue639Test extends PHPUnit_Smarty
{
public function setUp()
{
$this->setUpSmarty(dirname(__FILE__));
}

public function testInit()
{
$this->cleanDirs();
}

public function testInlineFirst()
{
$this->assertEquals("include-inline\ninclude-regular\n", $this->smarty->fetch('001_inline_first.tpl'));
}
public function testInlineLast()
{
$this->assertEquals("include-regular\ninclude-inline\n", $this->smarty->fetch('002_inline_last.tpl'));
}
}
2 changes: 2 additions & 0 deletions tests/UnitTests/TemplateSource/_Issues/639/cache/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Ignore anything in here, but keep this directory
*
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{include "string:include-inline\n" inline}
{include "string:include-regular\n"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{include "string:include-regular\n"}
{include "string:include-inline\n" inline}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Ignore anything in here, but keep this directory
*