summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/UnitTests/SmartyMethodsTests/Assign/AssignTest.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/UnitTests/SmartyMethodsTests/Assign/AssignTest.php b/tests/UnitTests/SmartyMethodsTests/Assign/AssignTest.php
index ea5f3a4b..e8ae92b7 100644
--- a/tests/UnitTests/SmartyMethodsTests/Assign/AssignTest.php
+++ b/tests/UnitTests/SmartyMethodsTests/Assign/AssignTest.php
@@ -42,4 +42,15 @@ class AssignTest extends PHPUnit_Smarty
$this->smarty->assign(array('foo' => 'bar', 'foo2' => 'bar2'));
$this->assertEquals('bar bar2', $this->smarty->fetch('eval:{$foo} {$foo2}'));
}
+
+ /**
+ * Test that assign returns this.
+ */
+ public function testAssignReturnsThis()
+ {
+ $this->assertEquals(
+ 'data',
+ $this->smarty->assign(['dummy' => 'data'])->fetch('eval:{$dummy}')
+ );
+ }
}