public function setUp() { $this->smarty = SmartyTests::$smarty; SmartyTests::init(); $this->smarty->force_compile = true; $this->smarty->safe_lookups = \Box\Brainy\Brainy::LOOKUP_SAFE; }
public function setUp() { $this->smarty = SmartyTests::$smarty; SmartyTests::init(); $this->smarty->clearCompiledTemplate(); $this->smarty->loadFilter('output', 'trimwhitespace'); }
public function setUp() { $this->smarty = SmartyTests::$smarty; SmartyTests::init(); // We want to show all errors for this test suite. error_reporting(E_ALL); }
public function setUp() { $this->smarty = SmartyTests::$smarty; SmartyTests::init(); $this->smarty->setTemplateDir(array('./templates/extendsresource/', './templates/')); // $this->smarty->registerFilter(Smarty::FILTER_PRE,'prefilterextends'); }
public function setUp() { $this->smarty = SmartyTests::$smarty; SmartyTests::init(); $this->smarty->force_compile = true; $this->smarty->disableSecurity(); }
public function setUp() { $this->smarty = SmartyTests::$smarty; SmartyTests::init(); $this->smarty->safe_lookups = \Box\Brainy\Brainy::LOOKUP_SAFE; $this->smarty->assign('foo', 'bar'); }
public function setUp() { $this->smarty = SmartyTests::$smarty; SmartyTests::init(); $this->now = mktime(15, 0, 0, 2, 20, 2014); $this->now_rel = mktime(15, 0, 0, 2, 20, 2014); }
public function setUp() { $this->smarty = SmartyTests::$smarty; $this->smarty->clearAllCache(); $this->smarty->clearCompiledTemplate(); SmartyTests::init(); }
public function setUp() { $this->smarty = SmartyTests::$smarty; SmartyTests::init(); $this->smarty->caching_type = 'mysqltest'; $this->smarty->addPluginsDir(dirname(__FILE__) . "/PHPunitplugins/"); }
public function setUp() { $this->smarty = SmartyTests::$smarty; // reset cache for unit test Smarty_Resource::$resources = array(); SmartyTests::init(); }
public function setUp() { $this->smarty = SmartyTests::$smarty; SmartyTests::init(); $this->smarty->force_compile = true; $this->smarty->security_policy = null; }
public function setUp() { $this->smarty = SmartyTests::$smarty; $this->smartyBC = SmartyTests::$smartyBC; SmartyTests::init(); $this->smarty->security_policy = null; $this->smartyBC->security_policy = null; }
public function setUp() { $this->smarty = SmartyTests::$smarty; SmartyTests::init(); $this->smarty->force_compile = true; $this->smarty->disableSecurity(); $this->smarty->registerDefaultPluginHandler('my_plugin_handler'); }
public function setUp() { $this->smarty = SmartyTests::$smarty; $this->smartyBC = SmartyTests::$smartyBC; SmartyTests::init(); $this->smarty->disableSecurity(); $this->smartyBC->disableSecurity(); }
public function setUp() { $this->smarty =& SmartyTests::$smarty; $this->smartyBC =& SmartyTests::$smartyBC; SmartyTests::init(); $this->smarty->escape_html = true; $this->smartyBC->escape_html = true; parent::setUp(); }
public function setUp() { $this->smarty = SmartyTests::$smarty; SmartyTests::init(); $this->smarty->addTemplateDir(dirname(__FILE__) . '/templates_2'); // note that 10 is a string! $this->smarty->addTemplateDir(dirname(__FILE__) . '/templates_3', '10'); $this->smarty->addTemplateDir(dirname(__FILE__) . '/templates_4', 'foo'); }
public function setUp() { $this->smarty = SmartyTests::$smarty; $this->smartyBC = SmartyTests::$smartyBC; SmartyTests::init(); $this->smarty->force_compile = true; $this->smartyBC->force_compile = true; $this->smarty->clearCompiledTemplate(); }
public function setUp() { $this->smarty = SmartyTests::$smarty; SmartyTests::init(); $this->smarty->force_compile = true; $this->smarty->disableSecurity(); $this->object = new RegObject(); $this->smarty->registerObject('objecttest', $this->object, 'myhello', true, 'myblock'); }
public function setUp() { $this->smarty = SmartyTests::$smarty; SmartyTests::init(); stream_wrapper_register("var", "VariableStream") or die("Failed to register protocol"); $fp = fopen("var://foo", "r+"); fwrite($fp, 'hello world'); fclose($fp); }
public function setUp() { $this->smarty = SmartyTests::$smarty; SmartyTests::init(); if (!class_exists('Smarty_CacheResource_Mysqltest', false)) { require_once dirname(__FILE__) . "/PHPunitplugins/CacheResource.Mysqltest.php"; } $this->smarty->caching_type = 'foobar'; $this->smarty->registerCacheResource('foobar', new Smarty_CacheResource_Mysqltest()); }
public function setUp() { $this->smarty = SmartyTests::$smarty; SmartyTests::init(); $this->smarty->caching_type = 'pdo'; $this->smarty->addPluginsDir(SMARTY_DIR . '../demo/plugins/'); $cnx = new PDO("mysql:dbname=test;host=127.0.0.1", "smarty"); $this->smarty->loadPlugin('Smarty_CacheResource_Pdo'); $this->smarty->registerCacheResource('pdo', new Smarty_CacheResource_Pdo($cnx, 'smarty_cache')); }
public function setUp() { $this->smarty = SmartyTests::$smarty; SmartyTests::init(); // empty the template dir $this->smarty->setTemplateDir(array()); // kill cache for unit test Smarty_Resource::$resources = array(); $this->smarty->_resource_handlers = array(); }
public function setUp() { $this->smarty = SmartyTests::$smarty; SmartyTests::init(); $this->smarty->security_policy->streams = array('global'); $this->smarty->assign('foo', 'bar'); stream_wrapper_register("global", "ResourceStream") or die("Failed to register protocol"); $fp = fopen("global://mytest", "r+"); fwrite($fp, 'hello world {$foo}'); fclose($fp); }
public function setUp() { $this->smarty = SmartyTests::$smarty; $this->smartyBC = SmartyTests::$smartyBC; SmartyTests::init(); $this->smarty->assign('foo', 'foo'); $this->smarty->assign('bar', 'bar'); $this->smarty->assign('blar', 'blar'); $this->smartyBC->assign('foo', 'foo'); $this->smartyBC->assign('bar', 'bar'); $this->smartyBC->assign('blar', 'blar'); }
public function setUp() { $this->smarty = SmartyTests::$smarty; $this->smartyBC = SmartyTests::$smartyBC; SmartyTests::init(); $this->smarty->assign('foo', 'foo'); $this->_data = new Smarty_Data($this->smarty); $this->_data->assign('bar', 'bar'); $this->_tpl = $this->smarty->createTemplate('eval:{$foo}{$bar}{$blar}', null, null, $this->_data); $this->_tpl->assign('blar', 'blar'); $this->smartyBC->assign('foo', 'foo'); $this->_dataBC = new Smarty_Data($this->smartyBC); $this->_dataBC->assign('bar', 'bar'); $this->_tplBC = $this->smartyBC->createTemplate('eval:{$foo}{$bar}{$blar}', null, null, $this->_dataBC); $this->_tplBC->assign('blar', 'blar'); }
public function setUp() { $this->smarty = SmartyTests::$smarty; $this->smartyBC = SmartyTests::$smartyBC; SmartyTests::init(); }
public function setUp() { $this->smartyBC = SmartyTests::$smartyBC; SmartyTests::init(); $this->smartyBC->force_compile = true; }
public function setUp() { $this->smarty = SmartyTests::$smarty; SmartyTests::init(); $this->smarty->registerResource("rr", array("rr_get_template", "rr_get_timestamp", "rr_get_secure", "rr_get_trusted")); }
public function setUp() { $this->smarty = SmartyTests::$smarty; SmartyTests::init(); $this->smarty->escape_html = true; }
public function setUp() { $this->smarty = SmartyTests::$smarty; SmartyTests::init(); $this->smarty->setTemplateDir(array('./templates/compileblockextends/', './templates/')); }