mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
remove file
This commit is contained in:
@@ -1,87 +0,0 @@
|
||||
<?php
|
||||
|
||||
require_once './config.php';
|
||||
require_once SMARTY_DIR . 'Smarty.class.php';
|
||||
require_once 'PHPUnit.php';
|
||||
|
||||
class SmartyTest extends PHPUnit_TestCase {
|
||||
// contains the object handle of the string class
|
||||
var $abc;
|
||||
// constructor of the test suite
|
||||
function SmartyTest($name) {
|
||||
$this->PHPUnit_TestCase($name);
|
||||
}
|
||||
// called before the test functions will be executed
|
||||
// this function is defined in PHPUnit_TestCase and overwritten
|
||||
// here
|
||||
function setUp() {
|
||||
// create a new instance of String with the
|
||||
// string 'abc'
|
||||
$this->smarty = new Smarty;
|
||||
}
|
||||
// called after the test functions are executed
|
||||
// this function is defined in PHPUnit_TestCase and overwritten
|
||||
// here
|
||||
function tearDown() {
|
||||
// delete your instance
|
||||
unset($this->smarty);
|
||||
}
|
||||
// test that template_dir exists
|
||||
function test_template_dir_exists() {
|
||||
$this->assertTrue(file_exists($this->smarty->template_dir));
|
||||
}
|
||||
// test that template_dir is a directory
|
||||
function test_template_dir_is_dir() {
|
||||
$this->assertTrue(is_dir($this->smarty->template_dir));
|
||||
}
|
||||
// test that template_dir is readable
|
||||
function test_template_dir_is_readable() {
|
||||
$this->assertTrue(is_readable($this->smarty->template_dir));
|
||||
}
|
||||
// test that config_dir exists
|
||||
function test_config_dir_exists() {
|
||||
$this->assertTrue(file_exists($this->smarty->config_dir));
|
||||
}
|
||||
// test that config_dir is a directory
|
||||
function test_config_dir_is_dir() {
|
||||
$this->assertTrue(is_dir($this->smarty->config_dir));
|
||||
}
|
||||
// test that config_dir is readable
|
||||
function test_config_dir_is_readable() {
|
||||
$this->assertTrue(is_readable($this->smarty->config_dir));
|
||||
}
|
||||
// test that compile_dir exists
|
||||
function test_compile_dir_exists() {
|
||||
$this->assertTrue(file_exists($this->smarty->compile_dir));
|
||||
}
|
||||
// test that compile_dir is a directory
|
||||
function test_compile_dir_is_dir() {
|
||||
$this->assertTrue(is_dir($this->smarty->compile_dir));
|
||||
}
|
||||
// test that compile_dir is readable
|
||||
function test_compile_dir_is_readable() {
|
||||
$this->assertTrue(is_readable($this->smarty->compile_dir));
|
||||
}
|
||||
// test that compile_dir is writable
|
||||
function test_compile_dir_is_writable() {
|
||||
$this->assertTrue(is_writable($this->smarty->compile_dir));
|
||||
}
|
||||
// test that cache_dir exists
|
||||
function test_cache_dir_exists() {
|
||||
$this->assertTrue(file_exists($this->smarty->cache_dir));
|
||||
}
|
||||
// test that cache_dir is a directory
|
||||
function test_cache_dir_is_dir() {
|
||||
$this->assertTrue(is_dir($this->smarty->cache_dir));
|
||||
}
|
||||
// test that cache_dir is readable
|
||||
function test_cache_dir_is_readable() {
|
||||
$this->assertTrue(is_readable($this->smarty->cache_dir));
|
||||
}
|
||||
// test that cache_dir is writable
|
||||
function test_cache_dir_is_writable() {
|
||||
$this->assertTrue(is_writable($this->smarty->cache_dir));
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
@@ -230,7 +230,7 @@ class SmartyTest extends PHPUnit_TestCase {
|
||||
|
||||
/* CONFIG FILE TESTS */
|
||||
|
||||
// test assigning a quoted global variable
|
||||
// test assigning a double quoted global variable
|
||||
function test_config_load_globals_double_quotes() {
|
||||
// load the global var
|
||||
$this->smarty->config_load('globals_double_quotes.conf');
|
||||
@@ -238,7 +238,7 @@ class SmartyTest extends PHPUnit_TestCase {
|
||||
$this->assertEquals($this->smarty->_config[0]['vars']['foo'], 'bar');
|
||||
}
|
||||
|
||||
// test assigning a quoted global
|
||||
// test assigning a single quoted global variable
|
||||
function test_config_load_globals_single_quotes() {
|
||||
// load the global var
|
||||
$this->smarty->config_load('globals_single_quotes.conf');
|
||||
|
Reference in New Issue
Block a user