mirror of
https://github.com/smarty-php/smarty.git
synced 2025-07-30 07:57:14 +02:00
unit tests
This commit is contained in:
@ -1,2 +0,0 @@
|
|||||||
# Ignore anything in here, but keep this directory
|
|
||||||
*
|
|
@ -1,2 +0,0 @@
|
|||||||
# Ignore anything in here, but keep this directory
|
|
||||||
*
|
|
@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests the ::hasVariable method
|
||||||
|
*/
|
||||||
|
class HasVariableTest extends PHPUnit_Smarty
|
||||||
|
{
|
||||||
|
public function setUp(): void
|
||||||
|
{
|
||||||
|
$this->setUpSmarty(__DIR__);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function testInit()
|
||||||
|
{
|
||||||
|
$this->cleanDirs();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testSimpleTrue()
|
||||||
|
{
|
||||||
|
$this->smarty->assign('foo', 'bar');
|
||||||
|
$this->assertTrue($this->smarty->hasVariable('foo'));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function testSimpleFalse()
|
||||||
|
{
|
||||||
|
$this->smarty->assign('foo', 'bar');
|
||||||
|
$this->assertFalse($this->smarty->hasVariable('foox'));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Reference in New Issue
Block a user