Skip to content
This repository was archived by the owner on Apr 13, 2020. It is now read-only.

Commit e1f8557

Browse files
committed
Modified Php tag tests to multiple php lines.
1 parent bd091fd commit e1f8557

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

UnitTests/TemplateSource/TagTests/Php/CompilePhpTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ public function testPHP_PASSTHRU_script()
9696
public function testPHP_QUOTE_php()
9797
{
9898
$this->smarty->setPhpHandling(Smarty::PHP_QUOTE);
99-
$content = $this->smarty->fetch("string:qa<?php echo 'hello world'; ?>qe");
100-
$this->assertEquals("qa&lt;?php echo 'hello world'; ?&gt;qe", $content, 'qoute <?php ?>');
99+
$content = $this->smarty->fetch("string:qa<?php echo 'hello world';\necho ' multiline'; ?>qe");
100+
$this->assertEquals("qa&lt;?php echo 'hello world';\necho ' multiline'; ?&gt;qe", $content, 'qoute <?php ?>');
101101
}
102102
/**
103103
* test <%...%> tag
@@ -135,9 +135,9 @@ public function testPHP_ALLOW_php()
135135
public function testPHP_ALLOW_asp()
136136
{
137137
$this->smartyBC->setPhpHandling(Smarty::PHP_ALLOW);
138-
$content = $this->smartyBC->fetch("string:aa <% echo 'hello world';%> ae");
138+
$content = $this->smartyBC->fetch("string:aa <% echo 'hello world';\n echo ' multiline';%> ae");
139139
if (ini_get('asp_tags')) {
140-
$this->assertEquals('aa hello world ae', $content, 'allow <% %>');
140+
$this->assertEquals('aa hello world multiline ae', $content, 'allow <% %>');
141141
} else {
142142
$this->assertEquals("aa <% echo 'hello world';%> ae", $content, 'allow asp disabled <% %>');
143143
}
@@ -149,8 +149,8 @@ public function testPHP_ALLOW_asp()
149149
public function testPHP_ALLOW_script()
150150
{
151151
$this->smartyBC->setPhpHandling(Smarty::PHP_ALLOW);
152-
$content = $this->smartyBC->fetch("string:aa <script language='php'> echo 'hello world';</script> ae");
153-
$this->assertEquals('aa hello world ae', $content, "allow <script language='php'>");
152+
$content = $this->smartyBC->fetch("string:aa <script language='php'> echo 'hello world';\n echo ' multiline';</script> ae");
153+
$this->assertEquals('aa hello world multiline ae', $content, "allow <script language='php'>");
154154
}
155155
/**
156156
* test <?php...\> tag
@@ -159,8 +159,8 @@ public function testPHP_ALLOW_script()
159159
public function testPHP_ALLOW_php2()
160160
{
161161
$this->smartyBC->setPhpHandling(Smarty::PHP_ALLOW);
162-
$content = $this->smartyBC->fetch("string:aa <?php echo '<?php'; ?> ae");
163-
$this->assertEquals('aa <?php ae', $content);
162+
$content = $this->smartyBC->fetch("string:aa <?php echo '<?php';\necho ' ?>'; ?> ae");
163+
$this->assertEquals('aa <?php ?> ae', $content);
164164
}
165165
/**
166166
* test <?php...\> tag

0 commit comments

Comments
 (0)