replace __DIR__

This commit is contained in:
uwetews
2015-12-31 05:36:00 +01:00
parent 66fa8ce092
commit 83e7c90c20
148 changed files with 258 additions and 245 deletions

View File

@@ -17,7 +17,7 @@ class PathNormalizationTest extends PHPUnit_Smarty
*/ */
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }
public function testNormalizeToAbsolute() { public function testNormalizeToAbsolute() {

View File

@@ -17,7 +17,7 @@ class ProtectedFolderVarsTest extends PHPUnit_Smarty
*/ */
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }
/* /*

View File

@@ -15,7 +15,7 @@ class UndefinedTemplateVarTest extends PHPUnit_Smarty
*/ */
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
error_reporting(E_ALL | E_STRICT); error_reporting(E_ALL | E_STRICT);
} }

View File

@@ -17,7 +17,7 @@ class AutoEscapeTest extends PHPUnit_Smarty
*/ */
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
$this->smarty->setEscapeHtml(true); $this->smarty->setEscapeHtml(true);
} }

View File

@@ -96,6 +96,19 @@ class FilterTest extends PHPUnit_Smarty
$this->assertEquals("bar hello world", $this->smarty->fetch($tpl)); $this->assertEquals("bar hello world", $this->smarty->fetch($tpl));
} }
/**
* test registered pre filter closure
*/
public function testRegisteredPreFilterClosure()
{
if (version_compare(PHP_VERSION, '5.2', '<=')) {
$this->markTestSkipped('closure not available');
}
$this->smarty->registerFilter(Smarty::FILTER_PRE, function($input) {return '{$foo}' . $input;});
$tpl = $this->smarty->createTemplate('eval:{" hello world"}');
$tpl->assign('foo', 'buh');
$this->assertEquals("buh hello world", $this->smarty->fetch($tpl));
}
/** /**
* test registered pre filter class * test registered pre filter class

View File

@@ -17,7 +17,7 @@ class LoadFilterTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }
/** /**

View File

@@ -17,7 +17,7 @@ class RegisterFilterTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }
/** /**

View File

@@ -17,7 +17,7 @@ class GetterSetterTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }
public function testInit() public function testInit()

View File

@@ -17,7 +17,7 @@ class DefaultPluginHandlerTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
$this->smarty->setForceCompile(true); $this->smarty->setForceCompile(true);
$this->smarty->disableSecurity(); $this->smarty->disableSecurity();
$this->smarty->registerDefaultPluginHandler('my_plugin_handler'); $this->smarty->registerDefaultPluginHandler('my_plugin_handler');

View File

@@ -13,12 +13,12 @@ class IncludePathTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
$this->smarty->use_include_path = true; $this->smarty->use_include_path = true;
$this->smarty->setPluginsDir(array('./include','./include1')); $this->smarty->setPluginsDir(array('./include','./include1'));
$this->smarty->enableSecurity(); $this->smarty->enableSecurity();
$ds = DS; $ds = DS;
set_include_path($this->smarty->_realpath(__DIR__ . "{$ds}..{$ds}..{$ds}..{$ds}Include_Path{$ds}Plugins{$ds}", true) . PATH_SEPARATOR . get_include_path()); set_include_path($this->smarty->_realpath(dirname(__FILE__) . "{$ds}..{$ds}..{$ds}..{$ds}Include_Path{$ds}Plugins{$ds}", true) . PATH_SEPARATOR . get_include_path());
} }
/** /**

View File

@@ -17,7 +17,7 @@ class LoadPluginTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }
/** /**

View File

@@ -19,7 +19,7 @@ class MuteExpectedErrorsTest extends PHPUnit_Smarty
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }
@@ -74,7 +74,7 @@ class MuteExpectedErrorsTest extends PHPUnit_Smarty
/** /**
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
* *
*/ */
@@ -99,7 +99,7 @@ class MuteExpectedErrorsTest extends PHPUnit_Smarty
} }
/** /**
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
* *
*/ */

View File

@@ -17,7 +17,7 @@ class OutputFilterTrimWhitespaceTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
$this->smarty->loadFilter('output', 'trimwhitespace'); $this->smarty->loadFilter('output', 'trimwhitespace');
} }

View File

@@ -17,7 +17,7 @@ class PluginChainedLoadTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }
public function testInit() public function testInit()
@@ -27,7 +27,7 @@ class PluginChainedLoadTest extends PHPUnit_Smarty
public function testPluginChainedLoad() public function testPluginChainedLoad()
{ {
$this->smarty->addPluginsDir(__DIR__ . "/PHPunitplugins/"); $this->smarty->addPluginsDir(dirname(__FILE__) . "/PHPunitplugins/");
$this->assertContains('from chain3', $this->smarty->fetch('test_plugin_chained_load.tpl')); $this->assertContains('from chain3', $this->smarty->fetch('test_plugin_chained_load.tpl'));
} }
} }

View File

@@ -13,7 +13,7 @@ class SharedFunctionsTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }
/** /**

View File

@@ -19,7 +19,7 @@ class SmartyBcTest extends PHPUnit_Smarty
public $loadSmarty = false; public $loadSmarty = false;
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }

View File

@@ -19,7 +19,7 @@ class HttpModifiedSinceTest extends PHPUnit_Smarty
public function setUp() public function setUp()
{ {
$this->markTestSkipped('modified since tests are disabled'); $this->markTestSkipped('modified since tests are disabled');
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }
public function testInit() public function testInit()

View File

@@ -6,7 +6,7 @@
* @author Uwe Tews * @author Uwe Tews
*/ */
if (ApcCacheEnable == true) { if (ApcCacheEnable == true) {
include_once __DIR__ . '/../Memcache/CacheResourceCustomMemcacheTest.php'; include_once dirname(__FILE__) . '/../Memcache/CacheResourceCustomMemcacheTest.php';
/** /**
* class for cache resource file tests * class for cache resource file tests
@@ -26,7 +26,7 @@ if (ApcCacheEnable == true) {
$this->markTestSkipped('APC cache not available'); $this->markTestSkipped('APC cache not available');
} }
} }
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
parent::setUp(); parent::setUp();
$this->smarty->setCachingType('apc'); $this->smarty->setCachingType('apc');
$this->smarty->addPluginsDir(SMARTY_DIR . '../demo/plugins/'); $this->smarty->addPluginsDir(SMARTY_DIR . '../demo/plugins/');

View File

@@ -6,7 +6,7 @@
* @author Uwe Tews * @author Uwe Tews
*/ */
include_once __DIR__ . '/../_shared/CacheResourceTestCommon.php'; include_once dirname(__FILE__) . '/../_shared/CacheResourceTestCommon.php';
/** /**
* class for cache resource file tests * class for cache resource file tests
@@ -20,7 +20,7 @@ class CacheResourceFileTest extends CacheResourceTestCommon
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
parent::setUp(); parent::setUp();
$this->smarty->setCachingType('filetest'); $this->smarty->setCachingType('filetest');
} }

View File

@@ -7,7 +7,7 @@
*/ */
if (MemCacheEnable == true) { if (MemCacheEnable == true) {
include_once __DIR__ . '/../_shared/CacheResourceTestCommon.php'; include_once dirname(__FILE__) . '/../_shared/CacheResourceTestCommon.php';
/** /**
* class for cache resource memcache tests * class for cache resource memcache tests
@@ -28,7 +28,7 @@ if (MemCacheEnable == true) {
if (MemCacheEnable != true) { if (MemCacheEnable != true) {
$this->markTestSkipped('Memcache tests are disabled'); $this->markTestSkipped('Memcache tests are disabled');
} }
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
parent::setUp(); parent::setUp();
$this->smarty->setCachingType('memcachetest'); $this->smarty->setCachingType('memcachetest');
} }

View File

@@ -7,7 +7,7 @@
*/ */
if (MysqlCacheEnable == true) { if (MysqlCacheEnable == true) {
include_once __DIR__ . '/../_shared/CacheResourceTestCommon.php'; include_once dirname(__FILE__) . '/../_shared/CacheResourceTestCommon.php';
/** /**
* class for cache resource file tests * class for cache resource file tests
@@ -27,7 +27,7 @@ if (MysqlCacheEnable == true) {
if (self::$init) { if (self::$init) {
$this->getConnection(); $this->getConnection();
} }
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
parent::setUp(); parent::setUp();
$this->smarty->setCachingType('mysqltest'); $this->smarty->setCachingType('mysqltest');
} }

View File

@@ -7,7 +7,7 @@
*/ */
if (PdoCacheEnable == true) { if (PdoCacheEnable == true) {
include_once __DIR__ . '/../_shared/CacheResourceTestCommon.php'; include_once dirname(__FILE__) . '/../_shared/CacheResourceTestCommon.php';
/** /**
* class for cache resource file tests * class for cache resource file tests
@@ -27,7 +27,7 @@ if (PdoCacheEnable == true) {
if (self::$init) { if (self::$init) {
$this->getConnection(); $this->getConnection();
} }
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
parent::setUp(); parent::setUp();
$this->smarty->setCachingType('pdo'); $this->smarty->setCachingType('pdo');
$this->smarty->addPluginsDir(SMARTY_DIR . '../demo/plugins/'); $this->smarty->addPluginsDir(SMARTY_DIR . '../demo/plugins/');

View File

@@ -7,7 +7,7 @@
*/ */
if (PdoGzipCacheEnable == true) { if (PdoGzipCacheEnable == true) {
include_once __DIR__ . '/../_shared/CacheResourceTestCommon.php'; include_once dirname(__FILE__) . '/../_shared/CacheResourceTestCommon.php';
/** /**
* class for cache resource file tests * class for cache resource file tests
@@ -25,7 +25,7 @@ if (PdoGzipCacheEnable == true) {
if (self::$init) { if (self::$init) {
$this->getConnection(); $this->getConnection();
} }
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
parent::setUp(); parent::setUp();
$this->smarty->setCachingType('pdo'); $this->smarty->setCachingType('pdo');
$this->smarty->addPluginsDir(SMARTY_DIR . '../demo/plugins/'); $this->smarty->addPluginsDir(SMARTY_DIR . '../demo/plugins/');

View File

@@ -6,7 +6,7 @@
* @author Uwe Tews * @author Uwe Tews
*/ */
if (MysqlCacheEnable == true) { if (MysqlCacheEnable == true) {
include_once __DIR__ . '/../_shared/CacheResourceTestCommon.php'; include_once dirname(__FILE__) . '/../_shared/CacheResourceTestCommon.php';
/** /**
* class for cache resource file tests * class for cache resource file tests
@@ -25,10 +25,10 @@ if (MysqlCacheEnable == true) {
if (self::$init) { if (self::$init) {
$this->getConnection(); $this->getConnection();
} }
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
parent::setUp(); parent::setUp();
if (!class_exists('Smarty_CacheResource_Mysqltest', false)) { if (!class_exists('Smarty_CacheResource_Mysqltest', false)) {
require_once(__DIR__ . "/../_shared/PHPunitplugins/cacheresource.mysqltest.php"); require_once(dirname(__FILE__) . "/../_shared/PHPunitplugins/cacheresource.mysqltest.php");
} }
$this->smarty->setCachingType('foobar'); $this->smarty->setCachingType('foobar');
$this->smarty->registerCacheResource('foobar', new Smarty_CacheResource_Mysqltest()); $this->smarty->registerCacheResource('foobar', new Smarty_CacheResource_Mysqltest());

View File

@@ -17,8 +17,8 @@ class CacheResourceTestCommon extends PHPUnit_Smarty
public function setUp() public function setUp()
{ {
$this->smarty->setTemplateDir(__DIR__ . '/../_shared/templates'); $this->smarty->setTemplateDir(dirname(__FILE__) . '/../_shared/templates');
$this->smarty->addPluginsDir(__DIR__ . '/../_shared/PHPunitplugins'); $this->smarty->addPluginsDir(dirname(__FILE__) . '/../_shared/PHPunitplugins');
$this->smarty->registerFilter('pre', array($this, 'compiledPrefilter')); $this->smarty->registerFilter('pre', array($this, 'compiledPrefilter'));
} }
@@ -514,9 +514,9 @@ class CacheResourceTestCommon extends PHPUnit_Smarty
{ {
$this->smarty->setCaching(true); $this->smarty->setCaching(true);
if ($folder == 0) { if ($folder == 0) {
$this->smarty->setTemplateDir(array(__DIR__ . '/../_shared/templates', __DIR__ . '/../_shared/templates/a')); $this->smarty->setTemplateDir(array(dirname(__FILE__) . '/../_shared/templates', dirname(__FILE__) . '/../_shared/templates/a'));
} else { } else {
$this->smarty->setTemplateDir(array(__DIR__ . '/../_shared/templates', __DIR__ . '/../_shared/templates/b')); $this->smarty->setTemplateDir(array(dirname(__FILE__) . '/../_shared/templates', dirname(__FILE__) . '/../_shared/templates/b'));
} }
if ($merge) { if ($merge) {
$this->smarty->setCompileId(1); $this->smarty->setCompileId(1);

View File

@@ -17,7 +17,7 @@ class CompileCompilerPluginTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }
public function testInit() public function testInit()

View File

@@ -17,7 +17,7 @@ class DelimiterTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }
public function testInit() public function testInit()

View File

@@ -22,7 +22,7 @@ class ConfigVarTest extends PHPUnit_Smarty
*/ */
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }
/** /**
@@ -43,7 +43,7 @@ class ConfigVarTest extends PHPUnit_Smarty
} }
/** /**
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
* *
* test string config variable * test string config variable
@@ -55,7 +55,7 @@ class ConfigVarTest extends PHPUnit_Smarty
} }
/** /**
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
* *
* test line string config variable * test line string config variable
@@ -67,7 +67,7 @@ class ConfigVarTest extends PHPUnit_Smarty
} }
/** /**
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
* *
* test config variables in global sections * test config variables in global sections
@@ -79,7 +79,7 @@ class ConfigVarTest extends PHPUnit_Smarty
} }
/** /**
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
* *
* test config variables loading section2 * test config variables loading section2
@@ -91,7 +91,7 @@ class ConfigVarTest extends PHPUnit_Smarty
} }
/** /**
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
* *
* test config variables loading section special char * test config variables loading section special char
@@ -103,7 +103,7 @@ class ConfigVarTest extends PHPUnit_Smarty
} }
/** /**
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
* *
* test config variables loading section foo/bar * test config variables loading section foo/bar
@@ -115,7 +115,7 @@ class ConfigVarTest extends PHPUnit_Smarty
} }
/** /**
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
* *
* test config variables loaded in different scopes from different sections (Smarty and template) * test config variables loaded in different scopes from different sections (Smarty and template)
@@ -133,7 +133,7 @@ class ConfigVarTest extends PHPUnit_Smarty
* test config variables of hidden sections * test config variables of hidden sections
* shall display variables from hidden section * shall display variables from hidden section
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
*/ */
public function testConfigVariableHidden() public function testConfigVariableHidden()
@@ -147,7 +147,7 @@ class ConfigVarTest extends PHPUnit_Smarty
* test config variables of disabled hidden sections * test config variables of disabled hidden sections
* shall display not variables from hidden section * shall display not variables from hidden section
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
*/ */
public function testConfigVariableHiddenDisable() public function testConfigVariableHiddenDisable()
@@ -161,7 +161,7 @@ class ConfigVarTest extends PHPUnit_Smarty
/** /**
* test getConfigVars * test getConfigVars
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
*/ */
public function testConfigGetSingleConfigVar() public function testConfigGetSingleConfigVar()
@@ -173,7 +173,7 @@ class ConfigVarTest extends PHPUnit_Smarty
/** /**
* test getConfigVars return all variables * test getConfigVars return all variables
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
*/ */
public function testConfigGetAllConfigVars() public function testConfigGetAllConfigVars()
@@ -188,7 +188,7 @@ class ConfigVarTest extends PHPUnit_Smarty
/** /**
* test clearConfig for single variable * test clearConfig for single variable
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
*/ */
public function testConfigClearSingleConfigVar() public function testConfigClearSingleConfigVar()
@@ -201,7 +201,7 @@ class ConfigVarTest extends PHPUnit_Smarty
/** /**
* test clearConfig for all variables * test clearConfig for all variables
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
*/ */
public function testConfigClearConfigAll() public function testConfigClearConfigAll()
@@ -216,7 +216,7 @@ class ConfigVarTest extends PHPUnit_Smarty
/** /**
* test config vars on data object * test config vars on data object
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
*/ */
public function testConfigTextData() public function testConfigTextData()
@@ -229,7 +229,7 @@ class ConfigVarTest extends PHPUnit_Smarty
/** /**
* test getConfigVars on data object * test getConfigVars on data object
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
*/ */
public function testConfigGetSingleConfigVarData() public function testConfigGetSingleConfigVarData()
@@ -242,7 +242,7 @@ class ConfigVarTest extends PHPUnit_Smarty
/** /**
* test getConfigVars return all variables on data object * test getConfigVars return all variables on data object
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
*/ */
public function testConfigGetAllConfigVarsData() public function testConfigGetAllConfigVarsData()
@@ -258,7 +258,7 @@ class ConfigVarTest extends PHPUnit_Smarty
/** /**
* test clearConfig for single variable on data object * test clearConfig for single variable on data object
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
*/ */
public function testConfigClearSingleConfigVarData() public function testConfigClearSingleConfigVarData()
@@ -273,7 +273,7 @@ class ConfigVarTest extends PHPUnit_Smarty
/** /**
* test clearConfig for all variables on data object * test clearConfig for all variables on data object
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
*/ */
public function testConfigClearConfigAllData() public function testConfigClearConfigAllData()
@@ -289,7 +289,7 @@ class ConfigVarTest extends PHPUnit_Smarty
/** /**
* test config vars on template object * test config vars on template object
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
*/ */
public function testConfigTextTemplate() public function testConfigTextTemplate()
@@ -302,7 +302,7 @@ class ConfigVarTest extends PHPUnit_Smarty
/** /**
* test getConfigVars on template object * test getConfigVars on template object
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
*/ */
public function testConfigGetSingleConfigVarTemplate() public function testConfigGetSingleConfigVarTemplate()
@@ -315,7 +315,7 @@ class ConfigVarTest extends PHPUnit_Smarty
/** /**
* test getConfigVars return all variables on template object * test getConfigVars return all variables on template object
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
*/ */
public function testConfigGetAllConfigVarsTemplate() public function testConfigGetAllConfigVarsTemplate()
@@ -331,7 +331,7 @@ class ConfigVarTest extends PHPUnit_Smarty
/** /**
* test clearConfig for single variable on template object * test clearConfig for single variable on template object
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
*/ */
public function testConfigClearSingleConfigVarTemplate() public function testConfigClearSingleConfigVarTemplate()
@@ -346,7 +346,7 @@ class ConfigVarTest extends PHPUnit_Smarty
/** /**
* test clearConfig for all variables on template object * test clearConfig for all variables on template object
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
*/ */
public function testConfigClearConfigAllTemplate() public function testConfigClearConfigAllTemplate()
@@ -362,7 +362,7 @@ class ConfigVarTest extends PHPUnit_Smarty
/** /**
* test config variables loading from absolute file path * test config variables loading from absolute file path
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
*/ */
public function testConfigAbsolutePath() public function testConfigAbsolutePath()

View File

@@ -23,7 +23,7 @@ class DefaultConfigHandlerTest extends PHPUnit_Smarty
*/ */
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
$this->smarty->setForceCompile(true); $this->smarty->setForceCompile(true);
} }

View File

@@ -19,7 +19,7 @@ class CustomResourceAmbiguousTest extends PHPUnit_Smarty
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
require_once dirname(__FILE__) . '/PHPunitplugins/resource.ambiguous.php'; require_once dirname(__FILE__) . '/PHPunitplugins/resource.ambiguous.php';
// empty the template dir // empty the template dir
@@ -57,7 +57,7 @@ class CustomResourceAmbiguousTest extends PHPUnit_Smarty
/** /**
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
* *
*/ */
@@ -77,7 +77,7 @@ class CustomResourceAmbiguousTest extends PHPUnit_Smarty
/** /**
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
* *
*/ */
@@ -97,7 +97,7 @@ class CustomResourceAmbiguousTest extends PHPUnit_Smarty
/** /**
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
* *
*/ */

View File

@@ -17,7 +17,7 @@ class ResourceExtendsAllPluginTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }
public function testInit() public function testInit()
@@ -118,7 +118,7 @@ class ResourceExtendsAllPluginTest extends PHPUnit_Smarty
} }
/** /**
* test extendsall special application * test extendsall special application
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
*/ */
public function testResourcePluginExtendsallSpecialApplication5() public function testResourcePluginExtendsallSpecialApplication5()

View File

@@ -23,7 +23,7 @@ if (MysqlResourceEnable == true) {
if (self::$init) { if (self::$init) {
$this->getConnection(); $this->getConnection();
} }
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }
public function testInit() public function testInit()

View File

@@ -17,7 +17,7 @@ class DefaultTemplateHandlerTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
$this->smarty->setForceCompile(true); $this->smarty->setForceCompile(true);
$this->smarty->disableSecurity(); $this->smarty->disableSecurity();
} }

View File

@@ -17,7 +17,7 @@ class EvalResourceTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }

View File

@@ -17,7 +17,7 @@ class ExtendsResourceTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }

View File

@@ -17,7 +17,7 @@ class FileResourceTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }
public function testInit() public function testInit()

View File

@@ -13,12 +13,12 @@ class FileIncludePathTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
$this->smarty->use_include_path = true; $this->smarty->use_include_path = true;
$this->smarty->setTemplateDir(array('./templates', './templates_2', './include')); $this->smarty->setTemplateDir(array('./templates', './templates_2', './include'));
$this->smarty->enableSecurity(); $this->smarty->enableSecurity();
$ds = DS; $ds = DS;
set_include_path($this->smarty->_realpath(__DIR__ . "{$ds}..{$ds}..{$ds}..{$ds}Include_Path{$ds}Tpl{$ds}", true) . PATH_SEPARATOR . get_include_path()); set_include_path($this->smarty->_realpath(dirname(__FILE__) . "{$ds}..{$ds}..{$ds}..{$ds}Include_Path{$ds}Tpl{$ds}", true) . PATH_SEPARATOR . get_include_path());
} }
/** /**

View File

@@ -13,11 +13,11 @@ class FileResourceIndexedTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
$this->smarty->addTemplateDir(__DIR__ . '/templates_2'); $this->smarty->addTemplateDir(dirname(__FILE__) . '/templates_2');
// note that 10 is a string! // note that 10 is a string!
$this->smarty->addTemplateDir(__DIR__ . '/templates_3', '10'); $this->smarty->addTemplateDir(dirname(__FILE__) . '/templates_3', '10');
$this->smarty->addTemplateDir(__DIR__ . '/templates_4', 'foo'); $this->smarty->addTemplateDir(dirname(__FILE__) . '/templates_4', 'foo');
} }
public function testInit() public function testInit()

View File

@@ -17,7 +17,7 @@ class PhpResourceTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }
@@ -133,7 +133,7 @@ class PhpResourceTest extends PHPUnit_Smarty
/** /**
* test getCachedTimestamp caching enabled * test getCachedTimestamp caching enabled
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
* *
*/ */
@@ -150,7 +150,7 @@ class PhpResourceTest extends PHPUnit_Smarty
/** /**
* test isCached * test isCached
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
* *
*/ */
@@ -176,7 +176,7 @@ class PhpResourceTest extends PHPUnit_Smarty
/** /**
* test isCached on touched source * test isCached on touched source
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
* *
*/ */
@@ -190,7 +190,7 @@ class PhpResourceTest extends PHPUnit_Smarty
/** /**
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
* *
*/ */
@@ -244,7 +244,7 @@ class PhpResourceTest extends PHPUnit_Smarty
/** /**
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
* *
*/ */

View File

@@ -18,7 +18,7 @@ class RegisteredResourceTest extends PHPUnit_Smarty
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
$this->smarty->registerResource("rr", array("rr_get_template", $this->smarty->registerResource("rr", array("rr_get_template",
"rr_get_timestamp", "rr_get_timestamp",

View File

@@ -17,7 +17,7 @@ class ResourcePluginTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }
public function testInit() public function testInit()

View File

@@ -17,7 +17,7 @@ class StreamResourceTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
$this->smarty->assign('foo', 'bar'); $this->smarty->assign('foo', 'bar');
stream_wrapper_register("global", "ResourceStream") stream_wrapper_register("global", "ResourceStream")

View File

@@ -17,7 +17,7 @@ class StringResourceTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }

View File

@@ -17,7 +17,7 @@ class FunctionTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }
public function testInit() public function testInit()

View File

@@ -18,7 +18,7 @@ class SecurityTest extends PHPUnit_Smarty
public $loadSmartyBC = true; public $loadSmartyBC = true;
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
$this->smarty->setForceCompile(true); $this->smarty->setForceCompile(true);
$this->smarty->enableSecurity(); $this->smarty->enableSecurity();
@@ -280,12 +280,12 @@ class SecurityTest extends PHPUnit_Smarty
*/ */
public function testNotTrustedDirectory() public function testNotTrustedDirectory()
{ {
$this->smarty->security_policy->secure_dir = array(str_replace('\\', '/', __DIR__ . '/templates_3/')); $this->smarty->security_policy->secure_dir = array(str_replace('\\', '/', dirname(__FILE__) . '/templates_3/'));
try { try {
$this->smarty->fetch('eval:{include file="templates_2/hello.tpl"}'); $this->smarty->fetch('eval:{include file="templates_2/hello.tpl"}');
} }
catch (Exception $e) { catch (Exception $e) {
$this->assertContains(str_replace('\\', '/', __DIR__ . "/templates_2/hello.tpl' not allowed by security setting"), str_replace('\\', '/', $e->getMessage())); $this->assertContains(str_replace('\\', '/', dirname(__FILE__) . "/templates_2/hello.tpl' not allowed by security setting"), str_replace('\\', '/', $e->getMessage()));
return; return;
} }

View File

@@ -17,7 +17,7 @@ class AppendTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }

View File

@@ -19,7 +19,7 @@ class AppendByRefBCTest extends PHPUnit_Smarty
public $loadSmarty = false; public $loadSmarty = false;
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }
public function testInit() public function testInit()

View File

@@ -17,7 +17,7 @@ class AppendByRefTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }
/** /**

View File

@@ -17,7 +17,7 @@ class AssignTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }

View File

@@ -19,7 +19,7 @@ class AssignByRefBCTest extends PHPUnit_Smarty
public $loadSmarty = false; public $loadSmarty = false;
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }

View File

@@ -17,7 +17,7 @@ class AssignByRefTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }
/** /**

View File

@@ -17,7 +17,7 @@ class AssignGlobalTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }

View File

@@ -22,7 +22,7 @@ class ClearAllAssignBCTest extends PHPUnit_Smarty
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
$this->smartyBC->assign('foo', 'foo'); $this->smartyBC->assign('foo', 'foo');
$this->_dataBC = new Smarty_Data($this->smartyBC); $this->_dataBC = new Smarty_Data($this->smartyBC);

View File

@@ -20,7 +20,7 @@ class ClearAllAssignTest extends PHPUnit_Smarty
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
$this->smarty->assign('foo', 'foo'); $this->smarty->assign('foo', 'foo');
$this->_data = new Smarty_Data($this->smarty); $this->_data = new Smarty_Data($this->smarty);

View File

@@ -19,7 +19,7 @@ class ClearAssignBCTest extends PHPUnit_Smarty
public $loadSmarty = false; public $loadSmarty = false;
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
$this->smartyBC->assign('foo', 'foo'); $this->smartyBC->assign('foo', 'foo');
$this->smartyBC->assign('bar', 'bar'); $this->smartyBC->assign('bar', 'bar');

View File

@@ -17,7 +17,7 @@ class ClearAssignTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
$this->smarty->assign('foo', 'foo'); $this->smarty->assign('foo', 'foo');
$this->smarty->assign('bar', 'bar'); $this->smarty->assign('bar', 'bar');
$this->smarty->assign('blar', 'blar'); $this->smarty->assign('blar', 'blar');

View File

@@ -21,7 +21,7 @@ class ClearCompiledBCTest extends PHPUnit_Smarty
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
$this->smartyBC->addTemplateDir('./templates_2/'); $this->smartyBC->addTemplateDir('./templates_2/');
} }

View File

@@ -18,7 +18,7 @@ class ClearCompiledTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
$this->smarty->addTemplateDir('./templates_2/'); $this->smarty->addTemplateDir('./templates_2/');
} }

View File

@@ -20,7 +20,7 @@ class get_template_varsBCTest extends PHPUnit_Smarty
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }

View File

@@ -17,7 +17,7 @@ class GetTemplateVarsTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }

View File

@@ -18,7 +18,7 @@ class RegisterBlockTest extends PHPUnit_Smarty
public $loadSmartyBC = true; public $loadSmartyBC = true;
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
$this->smarty->disableSecurity(); $this->smarty->disableSecurity();
$this->smartyBC->disableSecurity(); $this->smartyBC->disableSecurity();
} }

View File

@@ -20,7 +20,7 @@ class RegisterCompilerFunctionBCTest extends PHPUnit_Smarty
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }

View File

@@ -17,7 +17,7 @@ class RegisterCompilerFunctionTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }

View File

@@ -22,7 +22,7 @@ class RegisterFunctionBCTest extends PHPUnit_Smarty
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }
public function testInit() public function testInit()

View File

@@ -18,7 +18,7 @@ class RegisterFunctionTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }
public function testInit() public function testInit()

View File

@@ -17,7 +17,7 @@ class RegisterModifierTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }

View File

@@ -17,7 +17,7 @@ class CompileRegisteredObjectFunctionTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
$this->smarty->setForceCompile(true); $this->smarty->setForceCompile(true);
$this->smarty->disableSecurity(); $this->smarty->disableSecurity();

View File

@@ -17,7 +17,7 @@ class TemplateExistsTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }

View File

@@ -17,7 +17,7 @@ class CommentsTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }
public function testInit() public function testInit()

View File

@@ -17,7 +17,7 @@ class SpacingTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
$this->smarty->assign('foo', 'bar'); $this->smarty->assign('foo', 'bar');
} }

View File

@@ -17,7 +17,7 @@ class StaticClassAccessTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
$this->smarty->disableSecurity(); $this->smarty->disableSecurity();
} }

View File

@@ -17,7 +17,7 @@ class CompileAppendTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }

View File

@@ -17,7 +17,7 @@ class CompileAssignTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }
public function testInit() public function testInit()

View File

@@ -17,7 +17,7 @@ class CompileBlockPluginTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
$this->smarty->addPluginsDir("./PHPunitplugins/"); $this->smarty->addPluginsDir("./PHPunitplugins/");
$this->smarty->setForceCompile(true); $this->smarty->setForceCompile(true);
$this->smarty->disableSecurity(); $this->smarty->disableSecurity();
@@ -51,7 +51,7 @@ class CompileBlockPluginTest extends PHPUnit_Smarty
/** /**
* test block plugin tag in template file * test block plugin tag in template file
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
* *
*/ */
@@ -64,7 +64,7 @@ class CompileBlockPluginTest extends PHPUnit_Smarty
/** /**
* test block plugin tag in compiled template file * test block plugin tag in compiled template file
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
* *
*/ */
@@ -78,7 +78,7 @@ class CompileBlockPluginTest extends PHPUnit_Smarty
/** /**
* test block plugin tag in template file * test block plugin tag in template file
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
* *
*/ */
@@ -94,7 +94,7 @@ class CompileBlockPluginTest extends PHPUnit_Smarty
/** /**
* test block plugin function definition in script * test block plugin function definition in script
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
* *
*/ */

View File

@@ -17,7 +17,7 @@ class CompileBlockExtendsTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
//$this->smarty->setMergeCompiledIncludes(true); //$this->smarty->setMergeCompiledIncludes(true);
} }

View File

@@ -17,7 +17,7 @@ class CompileCaptureTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }
@@ -88,7 +88,7 @@ class CompileCaptureTest extends PHPUnit_Smarty
/** /**
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
* *
*/ */

View File

@@ -17,7 +17,7 @@ class CompilerPluginTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }

View File

@@ -22,7 +22,7 @@ class CompileConfigLoadTest extends PHPUnit_Smarty
*/ */
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }
/** /**
@@ -42,7 +42,7 @@ class CompileConfigLoadTest extends PHPUnit_Smarty
} }
/** /**
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
* *
* test {load_config} loading section2 shorttags * test {load_config} loading section2 shorttags
@@ -55,7 +55,7 @@ class CompileConfigLoadTest extends PHPUnit_Smarty
/** /**
* test config varibales loading local * test config varibales loading local
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
*/ */
public function testConfigVariableLocal() public function testConfigVariableLocal()
@@ -68,7 +68,7 @@ class CompileConfigLoadTest extends PHPUnit_Smarty
/** /**
* test config varibales loading parent * test config varibales loading parent
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
*/ */
public function testConfigVariableParent() public function testConfigVariableParent()
@@ -81,7 +81,7 @@ class CompileConfigLoadTest extends PHPUnit_Smarty
/** /**
* test config varibales loading global * test config varibales loading global
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
*/ */
public function testConfigVariableGlobal() public function testConfigVariableGlobal()
@@ -95,7 +95,7 @@ class CompileConfigLoadTest extends PHPUnit_Smarty
/** /**
* test config varibales loading all sections from template * test config varibales loading all sections from template
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
*/ */
public function testConfigVariableAllSectionsTemplate() public function testConfigVariableAllSectionsTemplate()
@@ -107,7 +107,7 @@ class CompileConfigLoadTest extends PHPUnit_Smarty
/** /**
* test config varibales overwrite * test config varibales overwrite
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
*/ */
public function testConfigVariableOverwrite() public function testConfigVariableOverwrite()
@@ -116,7 +116,7 @@ class CompileConfigLoadTest extends PHPUnit_Smarty
} }
/** /**
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
*/ */
public function testConfigVariableOverwrite2() public function testConfigVariableOverwrite2()
@@ -127,7 +127,7 @@ class CompileConfigLoadTest extends PHPUnit_Smarty
/** /**
* test config varibales overwrite false * test config varibales overwrite false
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
*/ */
public function testConfigVariableOverwriteFalse() public function testConfigVariableOverwriteFalse()
@@ -139,7 +139,7 @@ class CompileConfigLoadTest extends PHPUnit_Smarty
/** /**
* test config varibales booleanize on * test config varibales booleanize on
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
*/ */
public function testConfigVariableBooleanizeOn() public function testConfigVariableBooleanizeOn()
@@ -151,7 +151,7 @@ class CompileConfigLoadTest extends PHPUnit_Smarty
/** /**
* test config varibales booleanize off * test config varibales booleanize off
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
*/ */
public function testConfigVariableBooleanizeOff() public function testConfigVariableBooleanizeOff()

View File

@@ -17,7 +17,7 @@ class CompileDelimiterTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }

View File

@@ -17,7 +17,7 @@ class CompileEvalTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }

View File

@@ -17,7 +17,7 @@ class CompileForTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }
@@ -127,7 +127,7 @@ class CompileForTest extends PHPUnit_Smarty
/** /**
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
* *
*/ */
@@ -151,7 +151,7 @@ class CompileForTest extends PHPUnit_Smarty
/** /**
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
* *
*/ */
@@ -175,7 +175,7 @@ class CompileForTest extends PHPUnit_Smarty
/** /**
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
* *
*/ */

View File

@@ -17,7 +17,7 @@ class CompileForeachTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
//$this->smarty->force_compile = true; //$this->smarty->force_compile = true;
} }

View File

@@ -17,7 +17,7 @@ class CompileFunctionPluginTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }
public function testInit() public function testInit()

View File

@@ -17,7 +17,7 @@ class CompileIfTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }

View File

@@ -17,7 +17,7 @@ class CompileIncludeTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }

View File

@@ -19,7 +19,7 @@ class CompileIncludePhpTest extends PHPUnit_Smarty
public $loadSmarty = false; public $loadSmarty = false;
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
$this->smartyBC->setForceCompile(true); $this->smartyBC->setForceCompile(true);
} }

View File

@@ -17,8 +17,8 @@ class CompileInsertTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
$this->smarty->addPluginsDir(__DIR__ . "/PHPunitplugins/"); $this->smarty->addPluginsDir(dirname(__FILE__) . "/PHPunitplugins/");
$this->smarty->enableSecurity(); $this->smarty->enableSecurity();
} }
@@ -61,7 +61,7 @@ class CompileInsertTest extends PHPUnit_Smarty
$this->assertEquals('param foo bar globalvar global', $this->smarty->fetch($tpl)); $this->assertEquals('param foo bar globalvar global', $this->smarty->fetch($tpl));
} }
/** /**
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
* test insert plugin * test insert plugin
*/ */
@@ -89,13 +89,13 @@ class CompileInsertTest extends PHPUnit_Smarty
/** /**
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
* *
*/ */
public function testInsertPluginCaching1_2() public function testInsertPluginCaching1_2()
{ {
$this->smarty->addPluginsDir(__DIR__ . "/PHPunitplugins/"); $this->smarty->addPluginsDir(dirname(__FILE__) . "/PHPunitplugins/");
global $insertglobal; global $insertglobal;
$insertglobal = 'changed global 2'; $insertglobal = 'changed global 2';
$this->smarty->caching = 1; $this->smarty->caching = 1;
@@ -107,13 +107,13 @@ class CompileInsertTest extends PHPUnit_Smarty
/** /**
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
* *
*/ */
public function testInsertPluginCaching1_3() public function testInsertPluginCaching1_3()
{ {
$this->smarty->addPluginsDir(__DIR__ . "/PHPunitplugins/"); $this->smarty->addPluginsDir(dirname(__FILE__) . "/PHPunitplugins/");
global $insertglobal; global $insertglobal;
$insertglobal = 'changed global'; $insertglobal = 'changed global';
$this->smarty->caching = 1; $this->smarty->caching = 1;
@@ -124,14 +124,14 @@ class CompileInsertTest extends PHPUnit_Smarty
/** /**
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
* *
*/ */
public function testInsertPluginCaching1_4() public function testInsertPluginCaching1_4()
{ {
global $insertglobal; global $insertglobal;
$this->smarty->addPluginsDir(__DIR__ . "/PHPunitplugins/"); $this->smarty->addPluginsDir(dirname(__FILE__) . "/PHPunitplugins/");
if (true) { //disabled if (true) { //disabled
$insertglobal = 'changed global 4'; $insertglobal = 'changed global 4';
$this->smarty->caching = 1; $this->smarty->caching = 1;
@@ -156,7 +156,7 @@ class CompileInsertTest extends PHPUnit_Smarty
/** /**
* test insert plugin caching 2 * test insert plugin caching 2
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
*/ */
public function testInsertPluginCaching2_2() public function testInsertPluginCaching2_2()

View File

@@ -17,7 +17,7 @@ class LiteralTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }

View File

@@ -17,7 +17,7 @@ class CompileNocacheTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }
@@ -59,7 +59,7 @@ class CompileNocacheTest extends PHPUnit_Smarty
/** /**
* *
* @run InSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled
* *
*/ */

View File

@@ -18,7 +18,7 @@ class CompilePhpTest extends PHPUnit_Smarty
public $loadSmartyBC = true; public $loadSmartyBC = true;
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
$this->smartyBC->disableSecurity(); $this->smartyBC->disableSecurity();
$this->smarty->disableSecurity(); $this->smarty->disableSecurity();
$this->smarty->setCompileId($this->getName()); $this->smarty->setCompileId($this->getName());

View File

@@ -19,7 +19,7 @@ class PluginBlockTextformatTest extends PHPUnit_Smarty
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }
public function testDefault() public function testDefault()

View File

@@ -17,7 +17,7 @@ class PluginFunctionFetchTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }
public function testTodo() public function testTodo()

View File

@@ -19,7 +19,7 @@ class PluginFunctionHtmlCheckboxesTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }
public function testAssociativeArray() public function testAssociativeArray()

View File

@@ -17,7 +17,7 @@ class PluginFunctionHtmlImageTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }
public function testFoo() public function testFoo()

View File

@@ -19,7 +19,7 @@ class PluginFunctionHtmlOptionsTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }
public function testAssociativeArray() public function testAssociativeArray()

View File

@@ -18,7 +18,7 @@ class PluginFunctionHtmlRadiosTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
} }
public function testAssociativeArray() public function testAssociativeArray()

View File

@@ -209,7 +209,7 @@ class PluginFunctionHtmlSelectDateTest extends PHPUnit_Smarty
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
$year = date('Y'); $year = date('Y');
$this->now = mktime(15, 0, 0, 2, 20, $year); $this->now = mktime(15, 0, 0, 2, 20, $year);

View File

@@ -17,7 +17,7 @@ class PluginFunctionHtmlSelectTimeTest extends PHPUnit_Smarty
{ {
public function setUp() public function setUp()
{ {
$this->setUpSmarty(__DIR__); $this->setUpSmarty(dirname(__FILE__));
$this->now = mktime(16, 15, 11, 2, 20, 2011); $this->now = mktime(16, 15, 11, 2, 20, 2011);
} }

Some files were not shown because too many files have changed in this diff Show More