Files
smarty/tests/UnitTests/SmartyMethodsTests/AssignByRef/AssignByRefTest.php
2022-09-27 12:03:34 +02:00

34 lines
650 B
PHP

<?php
/**
* Smarty PHPunit tests assignByRef method
*
* @package PHPunit
* @author Uwe Tews
*/
/**
* class for assignByRef tests
*
* @runTestsInSeparateProcess
* @preserveGlobalState disabled
* @backupStaticAttributes enabled
*/
class AssignByRefTest extends PHPUnit_Smarty
{
public function setUp(): void
{
$this->setUpSmarty(__DIR__);
}
/**
* test simple assignByRef
*/
public function testSimpleAssignByRef()
{
$bar = 'bar';
$this->smarty->assignByRef('foo', $bar);
$bar = 'newbar';
$this->assertEquals('newbar', $this->smarty->fetch('eval:{$foo}'));
}
}