• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP SmartyTests类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中SmartyTests的典型用法代码示例。如果您正苦于以下问题:PHP SmartyTests类的具体用法?PHP SmartyTests怎么用?PHP SmartyTests使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了SmartyTests类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: setUp

 public function setUp()
 {
     $this->smarty = SmartyTests::$smarty;
     SmartyTests::init();
     $this->smarty->force_compile = true;
     $this->smarty->safe_lookups = \Box\Brainy\Brainy::LOOKUP_SAFE;
 }
开发者ID:xiaobudongzhang,项目名称:brainy,代码行数:7,代码来源:CompileIncludeTest.php


示例2: setUp

 public function setUp()
 {
     $this->smarty = SmartyTests::$smarty;
     SmartyTests::init();
     $this->smarty->clearCompiledTemplate();
     $this->smarty->loadFilter('output', 'trimwhitespace');
 }
开发者ID:xiaobudongzhang,项目名称:brainy,代码行数:7,代码来源:OutputFilterTrimWhitespaceTest.php


示例3: setUp

 public function setUp()
 {
     $this->smarty = SmartyTests::$smarty;
     SmartyTests::init();
     // We want to show all errors for this test suite.
     error_reporting(E_ALL);
 }
开发者ID:xiaobudongzhang,项目名称:brainy,代码行数:7,代码来源:EnforceModifierTest.php


示例4: setUp

 public function setUp()
 {
     $this->smarty = SmartyTests::$smarty;
     SmartyTests::init();
     $this->smarty->setTemplateDir(array('./templates/extendsresource/', './templates/'));
     //        $this->smarty->registerFilter(Smarty::FILTER_PRE,'prefilterextends');
 }
开发者ID:mrsank,项目名称:work_sample,代码行数:7,代码来源:ExtendsResourceTests.php


示例5: setUp

 public function setUp()
 {
     $this->smarty = SmartyTests::$smarty;
     SmartyTests::init();
     $this->smarty->force_compile = true;
     $this->smarty->disableSecurity();
 }
开发者ID:mrsank,项目名称:work_sample,代码行数:7,代码来源:DefaultTemplateHandlerTests.php


示例6: setUp

 public function setUp()
 {
     $this->smarty = SmartyTests::$smarty;
     $this->smarty->clearAllCache();
     $this->smarty->clearCompiledTemplate();
     SmartyTests::init();
 }
开发者ID:mrsank,项目名称:work_sample,代码行数:7,代码来源:StringResourceTests.php


示例7: setUp

 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);
 }
开发者ID:xiaobudongzhang,项目名称:brainy,代码行数:7,代码来源:PluginFunctionHtmlSelectDateTest.php


示例8: setUp

 public function setUp()
 {
     $this->smarty = SmartyTests::$smarty;
     SmartyTests::init();
     $this->smarty->caching_type = 'mysqltest';
     $this->smarty->addPluginsDir(dirname(__FILE__) . "/PHPunitplugins/");
 }
开发者ID:mrsank,项目名称:work_sample,代码行数:7,代码来源:CacheResourceCustomMysqlTests.php


示例9: setUp

 public function setUp()
 {
     $this->smarty = SmartyTests::$smarty;
     // reset cache for unit test
     Smarty_Resource::$resources = array();
     SmartyTests::init();
 }
开发者ID:jjs180,项目名称:dance-america,代码行数:7,代码来源:ResourcePluginTests.php


示例10: setUp

 public function setUp()
 {
     $this->smarty = SmartyTests::$smarty;
     SmartyTests::init();
     $this->smarty->force_compile = true;
     $this->smarty->security_policy = null;
 }
开发者ID:xiaobudongzhang,项目名称:brainy,代码行数:7,代码来源:DefaultConfigHandlerTest.php


示例11: setUp

 public function setUp()
 {
     $this->smarty = SmartyTests::$smarty;
     SmartyTests::init();
     $this->smarty->safe_lookups = \Box\Brainy\Brainy::LOOKUP_SAFE;
     $this->smarty->assign('foo', 'bar');
 }
开发者ID:xiaobudongzhang,项目名称:brainy,代码行数:7,代码来源:VariableScopeTest.php


示例12: setUp

 public function setUp()
 {
     $this->smarty = SmartyTests::$smarty;
     $this->smartyBC = SmartyTests::$smartyBC;
     SmartyTests::init();
     $this->smarty->security_policy = null;
     $this->smartyBC->security_policy = null;
 }
开发者ID:xiaobudongzhang,项目名称:brainy,代码行数:8,代码来源:RegisterBlockTest.php


示例13: setUp

 public function setUp()
 {
     $this->smarty = SmartyTests::$smarty;
     SmartyTests::init();
     $this->smarty->force_compile = true;
     $this->smarty->disableSecurity();
     $this->smarty->registerDefaultPluginHandler('my_plugin_handler');
 }
开发者ID:mrsank,项目名称:work_sample,代码行数:8,代码来源:DefaultPluginHandlerTests.php


示例14: setUp

 public function setUp()
 {
     $this->smarty = SmartyTests::$smarty;
     $this->smartyBC = SmartyTests::$smartyBC;
     SmartyTests::init();
     $this->smarty->disableSecurity();
     $this->smartyBC->disableSecurity();
 }
开发者ID:jjs180,项目名称:dance-america,代码行数:8,代码来源:RegisterBlockTests.php


示例15: setUp

 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');
 }
开发者ID:jjs180,项目名称:dance-america,代码行数:9,代码来源:CompileRegisteredObjectFunctionTests.php


示例16: 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');
 }
开发者ID:xiaobudongzhang,项目名称:brainy,代码行数:9,代码来源:IndexedFileResourceTest.php


示例17: setUp

 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();
 }
开发者ID:xiaobudongzhang,项目名称:brainy,代码行数:9,代码来源:SecurityTest.php


示例18: setUp

 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);
 }
开发者ID:jjs180,项目名称:dance-america,代码行数:9,代码来源:StreamVariableTests.php


示例19: setUp

 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());
 }
开发者ID:jjs180,项目名称:dance-america,代码行数:10,代码来源:CacheResourceCustomRegisteredTests.php


示例20: setUp

 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'));
 }
开发者ID:noyesno,项目名称:smarty,代码行数:10,代码来源:CacheResourceCustomPDOTests.php



注:本文中的SmartyTests类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP SmartyWrap类代码示例发布时间:2022-05-23
下一篇:
PHP SmartyPaginate类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap