Skip to content

Commit

Permalink
unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wisskid committed Mar 29, 2024
1 parent 27e5768 commit 91daac7
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 4 deletions.

This file was deleted.

This file was deleted.

@@ -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'));
}

}

0 comments on commit 91daac7

Please sign in to comment.