diff options
Diffstat (limited to 'tests/UnitTests/ResourceTests/FileIncludePath')
12 files changed, 0 insertions, 80 deletions
diff --git a/tests/UnitTests/ResourceTests/FileIncludePath/FileIncludePathTest.php b/tests/UnitTests/ResourceTests/FileIncludePath/FileIncludePathTest.php deleted file mode 100644 index 1447ef09..00000000 --- a/tests/UnitTests/ResourceTests/FileIncludePath/FileIncludePathTest.php +++ /dev/null @@ -1,67 +0,0 @@ -<?php - -/** - * Smarty PHPunit tests for File resources - * - * @package PHPunit - * @author Rodney Rehm - * @runTestsInSeparateProcess - * @preserveGlobalState disabled - * @backupStaticAttributes enabled - */ -class FileIncludePathTest extends PHPUnit_Smarty -{ - public function setUp(): void - { - $this->setUpSmarty(__DIR__); - $this->smarty->use_include_path = true; - $this->smarty->setTemplateDir(array('./templates', './templates_2', './include')); - $this->smarty->enableSecurity(); - $ds = DIRECTORY_SEPARATOR; - set_include_path($this->smarty->_realpath(__DIR__ . "{$ds}..{$ds}..{$ds}..{$ds}Include_Path{$ds}Tpl{$ds}", true) . PATH_SEPARATOR . get_include_path()); - } - - /** - * Tears down the fixture - * This method is called after a test is executed. - * - */ - protected function tearDown(): void - { - ini_restore('include_path'); - $this->smarty->disableSecurity(); - parent::tearDown(); - } - public function testInit() - { - $this->cleanDirs(); - } - public function testInclude1() - { - $this->assertStringContainsString('include_test1', $this->smarty->fetch('test1.tpl')); - } - public function testInclude2() - { - $this->assertStringContainsString('include_test2', $this->smarty->fetch('test2.tpl')); - } - public function testInclude3() - { - $this->assertStringContainsString('include_test3', $this->smarty->fetch('test3.tpl')); - } - public function testInclude31() - { - $this->smarty->use_include_path = false; - $this->smarty->security_policy->secure_dir = getcwd(); - $this->assertStringContainsString('include_test3', $this->smarty->fetch('test3.tpl')); - } - public function testInclude4() - { - $this->assertStringContainsString('include_test4', $this->smarty->fetch('test4.tpl')); - } - public function testInclude5() - { - $this->smarty->setTemplateDir(array('./')); - $this->assertStringContainsString('include path root', $this->smarty->fetch('test5.tpl')); - } - - } diff --git a/tests/UnitTests/ResourceTests/FileIncludePath/cache/.gitignore b/tests/UnitTests/ResourceTests/FileIncludePath/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/ResourceTests/FileIncludePath/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/ResourceTests/FileIncludePath/include_test3.tpl b/tests/UnitTests/ResourceTests/FileIncludePath/include_test3.tpl deleted file mode 100644 index 61298afb..00000000 --- a/tests/UnitTests/ResourceTests/FileIncludePath/include_test3.tpl +++ /dev/null @@ -1 +0,0 @@ -include_test3 diff --git a/tests/UnitTests/ResourceTests/FileIncludePath/templates/dirname.tpl b/tests/UnitTests/ResourceTests/FileIncludePath/templates/dirname.tpl deleted file mode 100644 index f10e14ab..00000000 --- a/tests/UnitTests/ResourceTests/FileIncludePath/templates/dirname.tpl +++ /dev/null @@ -1 +0,0 @@ -templates
\ No newline at end of file diff --git a/tests/UnitTests/ResourceTests/FileIncludePath/templates/test1.tpl b/tests/UnitTests/ResourceTests/FileIncludePath/templates/test1.tpl deleted file mode 100644 index dcc96887..00000000 --- a/tests/UnitTests/ResourceTests/FileIncludePath/templates/test1.tpl +++ /dev/null @@ -1 +0,0 @@ -{include 'include_test1.tpl'}
\ No newline at end of file diff --git a/tests/UnitTests/ResourceTests/FileIncludePath/templates/test2.tpl b/tests/UnitTests/ResourceTests/FileIncludePath/templates/test2.tpl deleted file mode 100644 index b5d41850..00000000 --- a/tests/UnitTests/ResourceTests/FileIncludePath/templates/test2.tpl +++ /dev/null @@ -1 +0,0 @@ -{include 'include_test2.tpl'}
\ No newline at end of file diff --git a/tests/UnitTests/ResourceTests/FileIncludePath/templates/test3.tpl b/tests/UnitTests/ResourceTests/FileIncludePath/templates/test3.tpl deleted file mode 100644 index 5d5690be..00000000 --- a/tests/UnitTests/ResourceTests/FileIncludePath/templates/test3.tpl +++ /dev/null @@ -1 +0,0 @@ -{include 'include_test3.tpl'}
\ No newline at end of file diff --git a/tests/UnitTests/ResourceTests/FileIncludePath/templates_2/dirname.tpl b/tests/UnitTests/ResourceTests/FileIncludePath/templates_2/dirname.tpl deleted file mode 100644 index b6e9ce55..00000000 --- a/tests/UnitTests/ResourceTests/FileIncludePath/templates_2/dirname.tpl +++ /dev/null @@ -1 +0,0 @@ -templates_2
\ No newline at end of file diff --git a/tests/UnitTests/ResourceTests/FileIncludePath/templates_2/include_test1.tpl b/tests/UnitTests/ResourceTests/FileIncludePath/templates_2/include_test1.tpl deleted file mode 100644 index c8d49087..00000000 --- a/tests/UnitTests/ResourceTests/FileIncludePath/templates_2/include_test1.tpl +++ /dev/null @@ -1 +0,0 @@ -include_test1 diff --git a/tests/UnitTests/ResourceTests/FileIncludePath/templates_3/dirname.tpl b/tests/UnitTests/ResourceTests/FileIncludePath/templates_3/dirname.tpl deleted file mode 100644 index 404b4397..00000000 --- a/tests/UnitTests/ResourceTests/FileIncludePath/templates_3/dirname.tpl +++ /dev/null @@ -1 +0,0 @@ -templates_3
\ No newline at end of file diff --git a/tests/UnitTests/ResourceTests/FileIncludePath/templates_4/dirname.tpl b/tests/UnitTests/ResourceTests/FileIncludePath/templates_4/dirname.tpl deleted file mode 100644 index b744ef31..00000000 --- a/tests/UnitTests/ResourceTests/FileIncludePath/templates_4/dirname.tpl +++ /dev/null @@ -1 +0,0 @@ -templates_4
\ No newline at end of file diff --git a/tests/UnitTests/ResourceTests/FileIncludePath/templates_c/.gitignore b/tests/UnitTests/ResourceTests/FileIncludePath/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/ResourceTests/FileIncludePath/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* |
