mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
replace __DIR__
This commit is contained in:
@@ -17,7 +17,7 @@ class PathNormalizationTest extends PHPUnit_Smarty
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
public function testNormalizeToAbsolute() {
|
||||
|
@@ -17,7 +17,7 @@ class ProtectedFolderVarsTest extends PHPUnit_Smarty
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -15,7 +15,7 @@ class UndefinedTemplateVarTest extends PHPUnit_Smarty
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
error_reporting(E_ALL | E_STRICT);
|
||||
}
|
||||
|
||||
|
@@ -17,7 +17,7 @@ class AutoEscapeTest extends PHPUnit_Smarty
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
$this->smarty->setEscapeHtml(true);
|
||||
}
|
||||
|
||||
|
@@ -96,6 +96,19 @@ class FilterTest extends PHPUnit_Smarty
|
||||
$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
|
||||
|
@@ -17,7 +17,7 @@ class LoadFilterTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -17,7 +17,7 @@ class RegisterFilterTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -17,7 +17,7 @@ class GetterSetterTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
public function testInit()
|
||||
|
@@ -17,7 +17,7 @@ class DefaultPluginHandlerTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
$this->smarty->setForceCompile(true);
|
||||
$this->smarty->disableSecurity();
|
||||
$this->smarty->registerDefaultPluginHandler('my_plugin_handler');
|
||||
|
@@ -13,12 +13,12 @@ class IncludePathTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
$this->smarty->use_include_path = true;
|
||||
$this->smarty->setPluginsDir(array('./include','./include1'));
|
||||
$this->smarty->enableSecurity();
|
||||
$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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -17,7 +17,7 @@ class LoadPluginTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -19,7 +19,7 @@ class MuteExpectedErrorsTest extends PHPUnit_Smarty
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ class MuteExpectedErrorsTest extends PHPUnit_Smarty
|
||||
|
||||
/**
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*
|
||||
*/
|
||||
@@ -99,7 +99,7 @@ class MuteExpectedErrorsTest extends PHPUnit_Smarty
|
||||
}
|
||||
|
||||
/**
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*
|
||||
*/
|
||||
|
@@ -17,7 +17,7 @@ class OutputFilterTrimWhitespaceTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
$this->smarty->loadFilter('output', 'trimwhitespace');
|
||||
}
|
||||
|
||||
|
@@ -17,7 +17,7 @@ class PluginChainedLoadTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
public function testInit()
|
||||
@@ -27,7 +27,7 @@ class PluginChainedLoadTest extends PHPUnit_Smarty
|
||||
|
||||
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'));
|
||||
}
|
||||
}
|
||||
|
@@ -13,7 +13,7 @@ class SharedFunctionsTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -19,7 +19,7 @@ class SmartyBcTest extends PHPUnit_Smarty
|
||||
public $loadSmarty = false;
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
|
||||
|
@@ -19,7 +19,7 @@ class HttpModifiedSinceTest extends PHPUnit_Smarty
|
||||
public function setUp()
|
||||
{
|
||||
$this->markTestSkipped('modified since tests are disabled');
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
public function testInit()
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
if (ApcCacheEnable == true) {
|
||||
include_once __DIR__ . '/../Memcache/CacheResourceCustomMemcacheTest.php';
|
||||
include_once dirname(__FILE__) . '/../Memcache/CacheResourceCustomMemcacheTest.php';
|
||||
|
||||
/**
|
||||
* class for cache resource file tests
|
||||
@@ -26,7 +26,7 @@ if (ApcCacheEnable == true) {
|
||||
$this->markTestSkipped('APC cache not available');
|
||||
}
|
||||
}
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
parent::setUp();
|
||||
$this->smarty->setCachingType('apc');
|
||||
$this->smarty->addPluginsDir(SMARTY_DIR . '../demo/plugins/');
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
include_once __DIR__ . '/../_shared/CacheResourceTestCommon.php';
|
||||
include_once dirname(__FILE__) . '/../_shared/CacheResourceTestCommon.php';
|
||||
|
||||
/**
|
||||
* class for cache resource file tests
|
||||
@@ -20,7 +20,7 @@ class CacheResourceFileTest extends CacheResourceTestCommon
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
parent::setUp();
|
||||
$this->smarty->setCachingType('filetest');
|
||||
}
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
if (MemCacheEnable == true) {
|
||||
|
||||
include_once __DIR__ . '/../_shared/CacheResourceTestCommon.php';
|
||||
include_once dirname(__FILE__) . '/../_shared/CacheResourceTestCommon.php';
|
||||
|
||||
/**
|
||||
* class for cache resource memcache tests
|
||||
@@ -28,7 +28,7 @@ if (MemCacheEnable == true) {
|
||||
if (MemCacheEnable != true) {
|
||||
$this->markTestSkipped('Memcache tests are disabled');
|
||||
}
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
parent::setUp();
|
||||
$this->smarty->setCachingType('memcachetest');
|
||||
}
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
if (MysqlCacheEnable == true) {
|
||||
|
||||
include_once __DIR__ . '/../_shared/CacheResourceTestCommon.php';
|
||||
include_once dirname(__FILE__) . '/../_shared/CacheResourceTestCommon.php';
|
||||
|
||||
/**
|
||||
* class for cache resource file tests
|
||||
@@ -27,7 +27,7 @@ if (MysqlCacheEnable == true) {
|
||||
if (self::$init) {
|
||||
$this->getConnection();
|
||||
}
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
parent::setUp();
|
||||
$this->smarty->setCachingType('mysqltest');
|
||||
}
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
if (PdoCacheEnable == true) {
|
||||
|
||||
include_once __DIR__ . '/../_shared/CacheResourceTestCommon.php';
|
||||
include_once dirname(__FILE__) . '/../_shared/CacheResourceTestCommon.php';
|
||||
|
||||
/**
|
||||
* class for cache resource file tests
|
||||
@@ -27,7 +27,7 @@ if (PdoCacheEnable == true) {
|
||||
if (self::$init) {
|
||||
$this->getConnection();
|
||||
}
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
parent::setUp();
|
||||
$this->smarty->setCachingType('pdo');
|
||||
$this->smarty->addPluginsDir(SMARTY_DIR . '../demo/plugins/');
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
if (PdoGzipCacheEnable == true) {
|
||||
|
||||
include_once __DIR__ . '/../_shared/CacheResourceTestCommon.php';
|
||||
include_once dirname(__FILE__) . '/../_shared/CacheResourceTestCommon.php';
|
||||
|
||||
/**
|
||||
* class for cache resource file tests
|
||||
@@ -25,7 +25,7 @@ if (PdoGzipCacheEnable == true) {
|
||||
if (self::$init) {
|
||||
$this->getConnection();
|
||||
}
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
parent::setUp();
|
||||
$this->smarty->setCachingType('pdo');
|
||||
$this->smarty->addPluginsDir(SMARTY_DIR . '../demo/plugins/');
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
if (MysqlCacheEnable == true) {
|
||||
include_once __DIR__ . '/../_shared/CacheResourceTestCommon.php';
|
||||
include_once dirname(__FILE__) . '/../_shared/CacheResourceTestCommon.php';
|
||||
|
||||
/**
|
||||
* class for cache resource file tests
|
||||
@@ -25,10 +25,10 @@ if (MysqlCacheEnable == true) {
|
||||
if (self::$init) {
|
||||
$this->getConnection();
|
||||
}
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
parent::setUp();
|
||||
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->registerCacheResource('foobar', new Smarty_CacheResource_Mysqltest());
|
||||
|
@@ -17,8 +17,8 @@ class CacheResourceTestCommon extends PHPUnit_Smarty
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
$this->smarty->setTemplateDir(__DIR__ . '/../_shared/templates');
|
||||
$this->smarty->addPluginsDir(__DIR__ . '/../_shared/PHPunitplugins');
|
||||
$this->smarty->setTemplateDir(dirname(__FILE__) . '/../_shared/templates');
|
||||
$this->smarty->addPluginsDir(dirname(__FILE__) . '/../_shared/PHPunitplugins');
|
||||
$this->smarty->registerFilter('pre', array($this, 'compiledPrefilter'));
|
||||
}
|
||||
|
||||
@@ -514,9 +514,9 @@ class CacheResourceTestCommon extends PHPUnit_Smarty
|
||||
{
|
||||
$this->smarty->setCaching(true);
|
||||
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 {
|
||||
$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) {
|
||||
$this->smarty->setCompileId(1);
|
||||
|
@@ -17,7 +17,7 @@ class CompileCompilerPluginTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
public function testInit()
|
||||
|
@@ -17,7 +17,7 @@ class DelimiterTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
public function testInit()
|
||||
|
@@ -22,7 +22,7 @@ class ConfigVarTest extends PHPUnit_Smarty
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -43,7 +43,7 @@ class ConfigVarTest extends PHPUnit_Smarty
|
||||
}
|
||||
|
||||
/**
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*
|
||||
* test string config variable
|
||||
@@ -55,7 +55,7 @@ class ConfigVarTest extends PHPUnit_Smarty
|
||||
}
|
||||
|
||||
/**
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*
|
||||
* test line string config variable
|
||||
@@ -67,7 +67,7 @@ class ConfigVarTest extends PHPUnit_Smarty
|
||||
}
|
||||
|
||||
/**
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*
|
||||
* test config variables in global sections
|
||||
@@ -79,7 +79,7 @@ class ConfigVarTest extends PHPUnit_Smarty
|
||||
}
|
||||
|
||||
/**
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*
|
||||
* test config variables loading section2
|
||||
@@ -91,7 +91,7 @@ class ConfigVarTest extends PHPUnit_Smarty
|
||||
}
|
||||
|
||||
/**
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*
|
||||
* test config variables loading section special char
|
||||
@@ -103,7 +103,7 @@ class ConfigVarTest extends PHPUnit_Smarty
|
||||
}
|
||||
|
||||
/**
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*
|
||||
* test config variables loading section foo/bar
|
||||
@@ -115,7 +115,7 @@ class ConfigVarTest extends PHPUnit_Smarty
|
||||
}
|
||||
|
||||
/**
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*
|
||||
* 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
|
||||
* shall display variables from hidden section
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*/
|
||||
public function testConfigVariableHidden()
|
||||
@@ -147,7 +147,7 @@ class ConfigVarTest extends PHPUnit_Smarty
|
||||
* test config variables of disabled hidden sections
|
||||
* shall display not variables from hidden section
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*/
|
||||
public function testConfigVariableHiddenDisable()
|
||||
@@ -161,7 +161,7 @@ class ConfigVarTest extends PHPUnit_Smarty
|
||||
/**
|
||||
* test getConfigVars
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*/
|
||||
public function testConfigGetSingleConfigVar()
|
||||
@@ -173,7 +173,7 @@ class ConfigVarTest extends PHPUnit_Smarty
|
||||
/**
|
||||
* test getConfigVars return all variables
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*/
|
||||
public function testConfigGetAllConfigVars()
|
||||
@@ -188,7 +188,7 @@ class ConfigVarTest extends PHPUnit_Smarty
|
||||
/**
|
||||
* test clearConfig for single variable
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*/
|
||||
public function testConfigClearSingleConfigVar()
|
||||
@@ -201,7 +201,7 @@ class ConfigVarTest extends PHPUnit_Smarty
|
||||
/**
|
||||
* test clearConfig for all variables
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*/
|
||||
public function testConfigClearConfigAll()
|
||||
@@ -216,7 +216,7 @@ class ConfigVarTest extends PHPUnit_Smarty
|
||||
/**
|
||||
* test config vars on data object
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*/
|
||||
public function testConfigTextData()
|
||||
@@ -229,7 +229,7 @@ class ConfigVarTest extends PHPUnit_Smarty
|
||||
/**
|
||||
* test getConfigVars on data object
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*/
|
||||
public function testConfigGetSingleConfigVarData()
|
||||
@@ -242,7 +242,7 @@ class ConfigVarTest extends PHPUnit_Smarty
|
||||
/**
|
||||
* test getConfigVars return all variables on data object
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*/
|
||||
public function testConfigGetAllConfigVarsData()
|
||||
@@ -258,7 +258,7 @@ class ConfigVarTest extends PHPUnit_Smarty
|
||||
/**
|
||||
* test clearConfig for single variable on data object
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*/
|
||||
public function testConfigClearSingleConfigVarData()
|
||||
@@ -273,7 +273,7 @@ class ConfigVarTest extends PHPUnit_Smarty
|
||||
/**
|
||||
* test clearConfig for all variables on data object
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*/
|
||||
public function testConfigClearConfigAllData()
|
||||
@@ -289,7 +289,7 @@ class ConfigVarTest extends PHPUnit_Smarty
|
||||
/**
|
||||
* test config vars on template object
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*/
|
||||
public function testConfigTextTemplate()
|
||||
@@ -302,7 +302,7 @@ class ConfigVarTest extends PHPUnit_Smarty
|
||||
/**
|
||||
* test getConfigVars on template object
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*/
|
||||
public function testConfigGetSingleConfigVarTemplate()
|
||||
@@ -315,7 +315,7 @@ class ConfigVarTest extends PHPUnit_Smarty
|
||||
/**
|
||||
* test getConfigVars return all variables on template object
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*/
|
||||
public function testConfigGetAllConfigVarsTemplate()
|
||||
@@ -331,7 +331,7 @@ class ConfigVarTest extends PHPUnit_Smarty
|
||||
/**
|
||||
* test clearConfig for single variable on template object
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*/
|
||||
public function testConfigClearSingleConfigVarTemplate()
|
||||
@@ -346,7 +346,7 @@ class ConfigVarTest extends PHPUnit_Smarty
|
||||
/**
|
||||
* test clearConfig for all variables on template object
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*/
|
||||
public function testConfigClearConfigAllTemplate()
|
||||
@@ -362,7 +362,7 @@ class ConfigVarTest extends PHPUnit_Smarty
|
||||
/**
|
||||
* test config variables loading from absolute file path
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*/
|
||||
public function testConfigAbsolutePath()
|
||||
|
@@ -23,7 +23,7 @@ class DefaultConfigHandlerTest extends PHPUnit_Smarty
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
$this->smarty->setForceCompile(true);
|
||||
}
|
||||
|
||||
|
@@ -19,7 +19,7 @@ class CustomResourceAmbiguousTest extends PHPUnit_Smarty
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
require_once dirname(__FILE__) . '/PHPunitplugins/resource.ambiguous.php';
|
||||
|
||||
// empty the template dir
|
||||
@@ -57,7 +57,7 @@ class CustomResourceAmbiguousTest extends PHPUnit_Smarty
|
||||
|
||||
/**
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*
|
||||
*/
|
||||
@@ -77,7 +77,7 @@ class CustomResourceAmbiguousTest extends PHPUnit_Smarty
|
||||
|
||||
/**
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*
|
||||
*/
|
||||
@@ -97,7 +97,7 @@ class CustomResourceAmbiguousTest extends PHPUnit_Smarty
|
||||
|
||||
/**
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*
|
||||
*/
|
||||
|
@@ -17,7 +17,7 @@ class ResourceExtendsAllPluginTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
public function testInit()
|
||||
@@ -118,7 +118,7 @@ class ResourceExtendsAllPluginTest extends PHPUnit_Smarty
|
||||
}
|
||||
/**
|
||||
* test extendsall special application
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*/
|
||||
public function testResourcePluginExtendsallSpecialApplication5()
|
||||
|
@@ -23,7 +23,7 @@ if (MysqlResourceEnable == true) {
|
||||
if (self::$init) {
|
||||
$this->getConnection();
|
||||
}
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
public function testInit()
|
||||
|
@@ -17,7 +17,7 @@ class DefaultTemplateHandlerTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
$this->smarty->setForceCompile(true);
|
||||
$this->smarty->disableSecurity();
|
||||
}
|
||||
|
@@ -17,7 +17,7 @@ class EvalResourceTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
|
||||
|
@@ -17,7 +17,7 @@ class ExtendsResourceTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
|
||||
|
@@ -17,7 +17,7 @@ class FileResourceTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
public function testInit()
|
||||
|
@@ -13,12 +13,12 @@ class FileIncludePathTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
$this->smarty->use_include_path = true;
|
||||
$this->smarty->setTemplateDir(array('./templates', './templates_2', './include'));
|
||||
$this->smarty->enableSecurity();
|
||||
$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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -13,11 +13,11 @@ class FileResourceIndexedTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->smarty->addTemplateDir(__DIR__ . '/templates_2');
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
$this->smarty->addTemplateDir(dirname(__FILE__) . '/templates_2');
|
||||
// note that 10 is a string!
|
||||
$this->smarty->addTemplateDir(__DIR__ . '/templates_3', '10');
|
||||
$this->smarty->addTemplateDir(__DIR__ . '/templates_4', 'foo');
|
||||
$this->smarty->addTemplateDir(dirname(__FILE__) . '/templates_3', '10');
|
||||
$this->smarty->addTemplateDir(dirname(__FILE__) . '/templates_4', 'foo');
|
||||
}
|
||||
|
||||
public function testInit()
|
||||
|
@@ -17,7 +17,7 @@ class PhpResourceTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ class PhpResourceTest extends PHPUnit_Smarty
|
||||
/**
|
||||
* test getCachedTimestamp caching enabled
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*
|
||||
*/
|
||||
@@ -150,7 +150,7 @@ class PhpResourceTest extends PHPUnit_Smarty
|
||||
/**
|
||||
* test isCached
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*
|
||||
*/
|
||||
@@ -176,7 +176,7 @@ class PhpResourceTest extends PHPUnit_Smarty
|
||||
/**
|
||||
* test isCached on touched source
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*
|
||||
*/
|
||||
@@ -190,7 +190,7 @@ class PhpResourceTest extends PHPUnit_Smarty
|
||||
|
||||
/**
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*
|
||||
*/
|
||||
@@ -244,7 +244,7 @@ class PhpResourceTest extends PHPUnit_Smarty
|
||||
|
||||
/**
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*
|
||||
*/
|
||||
|
@@ -18,7 +18,7 @@ class RegisteredResourceTest extends PHPUnit_Smarty
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
|
||||
$this->smarty->registerResource("rr", array("rr_get_template",
|
||||
"rr_get_timestamp",
|
||||
|
@@ -17,7 +17,7 @@ class ResourcePluginTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
public function testInit()
|
||||
|
@@ -17,7 +17,7 @@ class StreamResourceTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
|
||||
$this->smarty->assign('foo', 'bar');
|
||||
stream_wrapper_register("global", "ResourceStream")
|
||||
|
@@ -17,7 +17,7 @@ class StringResourceTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
|
||||
|
@@ -17,7 +17,7 @@ class FunctionTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
public function testInit()
|
||||
|
@@ -18,7 +18,7 @@ class SecurityTest extends PHPUnit_Smarty
|
||||
public $loadSmartyBC = true;
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
|
||||
$this->smarty->setForceCompile(true);
|
||||
$this->smarty->enableSecurity();
|
||||
@@ -280,12 +280,12 @@ class SecurityTest extends PHPUnit_Smarty
|
||||
*/
|
||||
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 {
|
||||
$this->smarty->fetch('eval:{include file="templates_2/hello.tpl"}');
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
@@ -17,7 +17,7 @@ class AppendTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
|
||||
|
@@ -19,7 +19,7 @@ class AppendByRefBCTest extends PHPUnit_Smarty
|
||||
public $loadSmarty = false;
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
public function testInit()
|
||||
|
@@ -17,7 +17,7 @@ class AppendByRefTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -17,7 +17,7 @@ class AssignTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
|
||||
|
@@ -19,7 +19,7 @@ class AssignByRefBCTest extends PHPUnit_Smarty
|
||||
public $loadSmarty = false;
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
|
||||
|
@@ -17,7 +17,7 @@ class AssignByRefTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -17,7 +17,7 @@ class AssignGlobalTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
|
||||
|
@@ -22,7 +22,7 @@ class ClearAllAssignBCTest extends PHPUnit_Smarty
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
|
||||
$this->smartyBC->assign('foo', 'foo');
|
||||
$this->_dataBC = new Smarty_Data($this->smartyBC);
|
||||
|
@@ -20,7 +20,7 @@ class ClearAllAssignTest extends PHPUnit_Smarty
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
|
||||
$this->smarty->assign('foo', 'foo');
|
||||
$this->_data = new Smarty_Data($this->smarty);
|
||||
|
@@ -19,7 +19,7 @@ class ClearAssignBCTest extends PHPUnit_Smarty
|
||||
public $loadSmarty = false;
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
|
||||
$this->smartyBC->assign('foo', 'foo');
|
||||
$this->smartyBC->assign('bar', 'bar');
|
||||
|
@@ -17,7 +17,7 @@ class ClearAssignTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
$this->smarty->assign('foo', 'foo');
|
||||
$this->smarty->assign('bar', 'bar');
|
||||
$this->smarty->assign('blar', 'blar');
|
||||
|
@@ -21,7 +21,7 @@ class ClearCompiledBCTest extends PHPUnit_Smarty
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
$this->smartyBC->addTemplateDir('./templates_2/');
|
||||
}
|
||||
|
||||
|
@@ -18,7 +18,7 @@ class ClearCompiledTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
$this->smarty->addTemplateDir('./templates_2/');
|
||||
}
|
||||
|
||||
|
@@ -20,7 +20,7 @@ class get_template_varsBCTest extends PHPUnit_Smarty
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
|
||||
|
@@ -17,7 +17,7 @@ class GetTemplateVarsTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
|
||||
|
@@ -18,7 +18,7 @@ class RegisterBlockTest extends PHPUnit_Smarty
|
||||
public $loadSmartyBC = true;
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
$this->smarty->disableSecurity();
|
||||
$this->smartyBC->disableSecurity();
|
||||
}
|
||||
|
@@ -20,7 +20,7 @@ class RegisterCompilerFunctionBCTest extends PHPUnit_Smarty
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
|
||||
|
@@ -17,7 +17,7 @@ class RegisterCompilerFunctionTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
|
||||
|
@@ -22,7 +22,7 @@ class RegisterFunctionBCTest extends PHPUnit_Smarty
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
public function testInit()
|
||||
|
@@ -18,7 +18,7 @@ class RegisterFunctionTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
public function testInit()
|
||||
|
@@ -17,7 +17,7 @@ class RegisterModifierTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
|
||||
|
@@ -17,7 +17,7 @@ class CompileRegisteredObjectFunctionTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
|
||||
$this->smarty->setForceCompile(true);
|
||||
$this->smarty->disableSecurity();
|
||||
|
@@ -17,7 +17,7 @@ class TemplateExistsTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
|
||||
|
@@ -17,7 +17,7 @@ class CommentsTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
public function testInit()
|
||||
|
@@ -17,7 +17,7 @@ class SpacingTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
$this->smarty->assign('foo', 'bar');
|
||||
}
|
||||
|
||||
|
@@ -17,7 +17,7 @@ class StaticClassAccessTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
$this->smarty->disableSecurity();
|
||||
}
|
||||
|
||||
|
@@ -17,7 +17,7 @@ class CompileAppendTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
|
||||
|
@@ -17,7 +17,7 @@ class CompileAssignTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
public function testInit()
|
||||
|
@@ -17,7 +17,7 @@ class CompileBlockPluginTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
$this->smarty->addPluginsDir("./PHPunitplugins/");
|
||||
$this->smarty->setForceCompile(true);
|
||||
$this->smarty->disableSecurity();
|
||||
@@ -51,7 +51,7 @@ class CompileBlockPluginTest extends PHPUnit_Smarty
|
||||
/**
|
||||
* test block plugin tag in template file
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*
|
||||
*/
|
||||
@@ -64,7 +64,7 @@ class CompileBlockPluginTest extends PHPUnit_Smarty
|
||||
/**
|
||||
* test block plugin tag in compiled template file
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*
|
||||
*/
|
||||
@@ -78,7 +78,7 @@ class CompileBlockPluginTest extends PHPUnit_Smarty
|
||||
/**
|
||||
* test block plugin tag in template file
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*
|
||||
*/
|
||||
@@ -94,7 +94,7 @@ class CompileBlockPluginTest extends PHPUnit_Smarty
|
||||
/**
|
||||
* test block plugin function definition in script
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*
|
||||
*/
|
||||
|
@@ -17,7 +17,7 @@ class CompileBlockExtendsTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
//$this->smarty->setMergeCompiledIncludes(true);
|
||||
}
|
||||
|
||||
|
@@ -17,7 +17,7 @@ class CompileCaptureTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ class CompileCaptureTest extends PHPUnit_Smarty
|
||||
|
||||
/**
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*
|
||||
*/
|
||||
|
@@ -17,7 +17,7 @@ class CompilerPluginTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
|
||||
|
@@ -22,7 +22,7 @@ class CompileConfigLoadTest extends PHPUnit_Smarty
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -42,7 +42,7 @@ class CompileConfigLoadTest extends PHPUnit_Smarty
|
||||
}
|
||||
|
||||
/**
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*
|
||||
* test {load_config} loading section2 shorttags
|
||||
@@ -55,7 +55,7 @@ class CompileConfigLoadTest extends PHPUnit_Smarty
|
||||
/**
|
||||
* test config varibales loading local
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*/
|
||||
public function testConfigVariableLocal()
|
||||
@@ -68,7 +68,7 @@ class CompileConfigLoadTest extends PHPUnit_Smarty
|
||||
/**
|
||||
* test config varibales loading parent
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*/
|
||||
public function testConfigVariableParent()
|
||||
@@ -81,7 +81,7 @@ class CompileConfigLoadTest extends PHPUnit_Smarty
|
||||
/**
|
||||
* test config varibales loading global
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*/
|
||||
public function testConfigVariableGlobal()
|
||||
@@ -95,7 +95,7 @@ class CompileConfigLoadTest extends PHPUnit_Smarty
|
||||
/**
|
||||
* test config varibales loading all sections from template
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*/
|
||||
public function testConfigVariableAllSectionsTemplate()
|
||||
@@ -107,7 +107,7 @@ class CompileConfigLoadTest extends PHPUnit_Smarty
|
||||
/**
|
||||
* test config varibales overwrite
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*/
|
||||
public function testConfigVariableOverwrite()
|
||||
@@ -116,7 +116,7 @@ class CompileConfigLoadTest extends PHPUnit_Smarty
|
||||
}
|
||||
|
||||
/**
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*/
|
||||
public function testConfigVariableOverwrite2()
|
||||
@@ -127,7 +127,7 @@ class CompileConfigLoadTest extends PHPUnit_Smarty
|
||||
/**
|
||||
* test config varibales overwrite false
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*/
|
||||
public function testConfigVariableOverwriteFalse()
|
||||
@@ -139,7 +139,7 @@ class CompileConfigLoadTest extends PHPUnit_Smarty
|
||||
/**
|
||||
* test config varibales booleanize on
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*/
|
||||
public function testConfigVariableBooleanizeOn()
|
||||
@@ -151,7 +151,7 @@ class CompileConfigLoadTest extends PHPUnit_Smarty
|
||||
/**
|
||||
* test config varibales booleanize off
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*/
|
||||
public function testConfigVariableBooleanizeOff()
|
||||
|
@@ -17,7 +17,7 @@ class CompileDelimiterTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
|
||||
|
@@ -17,7 +17,7 @@ class CompileEvalTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
|
||||
|
@@ -17,7 +17,7 @@ class CompileForTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@ class CompileForTest extends PHPUnit_Smarty
|
||||
|
||||
/**
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*
|
||||
*/
|
||||
@@ -151,7 +151,7 @@ class CompileForTest extends PHPUnit_Smarty
|
||||
|
||||
/**
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*
|
||||
*/
|
||||
@@ -175,7 +175,7 @@ class CompileForTest extends PHPUnit_Smarty
|
||||
|
||||
/**
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*
|
||||
*/
|
||||
|
@@ -17,7 +17,7 @@ class CompileForeachTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
//$this->smarty->force_compile = true;
|
||||
}
|
||||
|
||||
|
@@ -17,7 +17,7 @@ class CompileFunctionPluginTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
public function testInit()
|
||||
|
@@ -17,7 +17,7 @@ class CompileIfTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
|
||||
|
@@ -17,7 +17,7 @@ class CompileIncludeTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
|
||||
|
@@ -19,7 +19,7 @@ class CompileIncludePhpTest extends PHPUnit_Smarty
|
||||
public $loadSmarty = false;
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
$this->smartyBC->setForceCompile(true);
|
||||
}
|
||||
|
||||
|
@@ -17,8 +17,8 @@ class CompileInsertTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->smarty->addPluginsDir(__DIR__ . "/PHPunitplugins/");
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
$this->smarty->addPluginsDir(dirname(__FILE__) . "/PHPunitplugins/");
|
||||
$this->smarty->enableSecurity();
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ class CompileInsertTest extends PHPUnit_Smarty
|
||||
$this->assertEquals('param foo bar globalvar global', $this->smarty->fetch($tpl));
|
||||
}
|
||||
/**
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
* test insert plugin
|
||||
*/
|
||||
@@ -89,13 +89,13 @@ class CompileInsertTest extends PHPUnit_Smarty
|
||||
|
||||
/**
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*
|
||||
*/
|
||||
public function testInsertPluginCaching1_2()
|
||||
{
|
||||
$this->smarty->addPluginsDir(__DIR__ . "/PHPunitplugins/");
|
||||
$this->smarty->addPluginsDir(dirname(__FILE__) . "/PHPunitplugins/");
|
||||
global $insertglobal;
|
||||
$insertglobal = 'changed global 2';
|
||||
$this->smarty->caching = 1;
|
||||
@@ -107,13 +107,13 @@ class CompileInsertTest extends PHPUnit_Smarty
|
||||
|
||||
/**
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*
|
||||
*/
|
||||
public function testInsertPluginCaching1_3()
|
||||
{
|
||||
$this->smarty->addPluginsDir(__DIR__ . "/PHPunitplugins/");
|
||||
$this->smarty->addPluginsDir(dirname(__FILE__) . "/PHPunitplugins/");
|
||||
global $insertglobal;
|
||||
$insertglobal = 'changed global';
|
||||
$this->smarty->caching = 1;
|
||||
@@ -124,14 +124,14 @@ class CompileInsertTest extends PHPUnit_Smarty
|
||||
|
||||
/**
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*
|
||||
*/
|
||||
public function testInsertPluginCaching1_4()
|
||||
{
|
||||
global $insertglobal;
|
||||
$this->smarty->addPluginsDir(__DIR__ . "/PHPunitplugins/");
|
||||
$this->smarty->addPluginsDir(dirname(__FILE__) . "/PHPunitplugins/");
|
||||
if (true) { //disabled
|
||||
$insertglobal = 'changed global 4';
|
||||
$this->smarty->caching = 1;
|
||||
@@ -156,7 +156,7 @@ class CompileInsertTest extends PHPUnit_Smarty
|
||||
|
||||
/**
|
||||
* test insert plugin caching 2
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*/
|
||||
public function testInsertPluginCaching2_2()
|
||||
|
@@ -17,7 +17,7 @@ class LiteralTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
|
||||
|
@@ -17,7 +17,7 @@ class CompileNocacheTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ class CompileNocacheTest extends PHPUnit_Smarty
|
||||
|
||||
/**
|
||||
*
|
||||
* @run InSeparateProcess
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*
|
||||
*/
|
||||
|
@@ -18,7 +18,7 @@ class CompilePhpTest extends PHPUnit_Smarty
|
||||
public $loadSmartyBC = true;
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
$this->smartyBC->disableSecurity();
|
||||
$this->smarty->disableSecurity();
|
||||
$this->smarty->setCompileId($this->getName());
|
||||
|
@@ -19,7 +19,7 @@ class PluginBlockTextformatTest extends PHPUnit_Smarty
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
public function testDefault()
|
||||
|
@@ -17,7 +17,7 @@ class PluginFunctionFetchTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
public function testTodo()
|
||||
|
@@ -19,7 +19,7 @@ class PluginFunctionHtmlCheckboxesTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
public function testAssociativeArray()
|
||||
|
@@ -17,7 +17,7 @@ class PluginFunctionHtmlImageTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
public function testFoo()
|
||||
|
@@ -19,7 +19,7 @@ class PluginFunctionHtmlOptionsTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
public function testAssociativeArray()
|
||||
|
@@ -18,7 +18,7 @@ class PluginFunctionHtmlRadiosTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
}
|
||||
|
||||
public function testAssociativeArray()
|
||||
|
@@ -209,7 +209,7 @@ class PluginFunctionHtmlSelectDateTest extends PHPUnit_Smarty
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
|
||||
$year = date('Y');
|
||||
$this->now = mktime(15, 0, 0, 2, 20, $year);
|
||||
|
@@ -17,7 +17,7 @@ class PluginFunctionHtmlSelectTimeTest extends PHPUnit_Smarty
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
$this->setUpSmarty(dirname(__FILE__));
|
||||
$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
Reference in New Issue
Block a user