Exemplo n.º 1
0
 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);
 }
Exemplo n.º 4
0
 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();
 }
Exemplo n.º 6
0
 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->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;
     SmartyTests::init();
     $this->smarty->caching_type = 'mysqltest';
     $this->smarty->addPluginsDir(dirname(__FILE__) . "/PHPunitplugins/");
 }
Exemplo n.º 9
0
 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;
 }
Exemplo n.º 11
0
 public function setUp()
 {
     $this->smarty = SmartyTests::$smarty;
     SmartyTests::init();
     $this->smarty->safe_lookups = \Box\Brainy\Brainy::LOOKUP_SAFE;
     $this->smarty->assign('foo', 'bar');
 }
Exemplo n.º 12
0
 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');
 }
Exemplo n.º 14
0
 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;
     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();
     $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');
 }
Exemplo n.º 17
0
 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();
 }
Exemplo n.º 18
0
 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());
 }
Exemplo n.º 20
0
 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();
 }
Exemplo n.º 22
0
 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);
 }
Exemplo n.º 23
0
 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');
 }
Exemplo n.º 24
0
 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');
 }
Exemplo n.º 25
0
 public function setUp()
 {
     $this->smartyBC = SmartyTests::$smartyBC;
     SmartyTests::init();
     $this->smartyBC->force_compile = true;
 }
Exemplo n.º 26
0
 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"));
 }
Exemplo n.º 27
0
 public function __construct()
 {
     SmartyTests::$smarty = new Smarty();
     SmartyTests::$smartyBC = new SmartyBC();
 }
Exemplo n.º 28
0
 protected function clearFiles()
 {
     SmartyTests::clearFiles();
 }
Exemplo n.º 29
0
 public function setUp()
 {
     $this->smarty = SmartyTests::$smarty;
     $this->smartyBC = SmartyTests::$smartyBC;
     SmartyTests::init();
 }
Exemplo n.º 30
0
 public function setUp()
 {
     $this->smarty = SmartyTests::$smarty;
     SmartyTests::init();
     $this->smarty->setTemplateDir(array('./templates/compileblockextends/', './templates/'));
 }