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

PHP MODxTestCase类代码示例

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

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



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

示例1: setUp

 public function setUp()
 {
     parent::setUp();
     $this->modx->loadClass('mail.modMail', MODX_CORE_PATH . 'model/modx/', true, true);
     $this->mail = $this->getMockForAbstractClass('modMail', array(&$this->modx));
     $this->mail->expects($this->any())->method('_getMailer')->will($this->returnValue(true));
 }
开发者ID:rosstimson,项目名称:revolution,代码行数:7,代码来源:modMailTest.php


示例2: setUp

 public function setUp()
 {
     parent::setUp();
     $this->modx->getParser();
     $this->tag = new modPlaceholderTag($this->modx);
     $this->tag->setCacheable(false);
     $this->tag->set('name', 'utp');
 }
开发者ID:kuvj,项目名称:revo,代码行数:8,代码来源:modOutputFilterTest.php


示例3: setUp

 /**
  * Setup some basic data for this test.
  */
 public function setUp()
 {
     parent::setUp();
     /** @var modSnippet $snippet */
     $snippet = $this->modx->newObject('modSnippet');
     $snippet->fromArray(array('name' => 'UnitTestSnippet'));
     $snippet->save();
 }
开发者ID:rosstimson,项目名称:revolution,代码行数:11,代码来源:SnippetTest.php


示例4: setUp

 /**
  * Setup some basic data for this test.
  */
 public function setUp()
 {
     parent::setUp();
     /** @var modTemplateVar $tv */
     $tv = $this->modx->newObject('modTemplateVar');
     $tv->fromArray(array('name' => 'UnitTestTv'));
     $tv->save();
 }
开发者ID:rosstimson,项目名称:revolution,代码行数:11,代码来源:TemplateVarTest.php


示例5: setUp

 /**
  * Load some utility classes this case uses
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $this->modx->loadClass('modDashboard');
     $this->modx->loadClass('modManagerController', MODX_CORE_PATH . 'model/modx/', true, true);
     $this->modx->loadClass('modManagerControllerDeprecated', MODX_CORE_PATH . 'model/modx/', true, true);
     require_once MODX_MANAGER_PATH . 'controllers/default/welcome.class.php';
 }
开发者ID:ChrstnMgcn,项目名称:revolution,代码行数:12,代码来源:modDashboardTest.php


示例6: setUp

 public function setUp()
 {
     parent::setUp();
     try {
     } catch (Exception $e) {
         $this->modx->log(modX::LOG_LEVEL_ERROR, $e->getMessage(), '', __METHOD__, __FILE__, __LINE__);
     }
 }
开发者ID:jiripavlicek,项目名称:revolution,代码行数:8,代码来源:DirectoryTest.php


示例7: tearDown

 /**
  * Cleanup data after this test.
  */
 public function tearDown()
 {
     parent::tearDown();
     $contexts = $this->modx->getCollection('modContext', array('key:LIKE' => '%unittest%'));
     /** @var modContext $ctx */
     foreach ($contexts as $ctx) {
         $ctx->remove();
     }
 }
开发者ID:rosstimson,项目名称:revolution,代码行数:12,代码来源:ContextTest.php


示例8: tearDown

 /**
  * Cleanup data after this test.
  */
 public function tearDown()
 {
     parent::tearDown();
     /** @var modCategory $category */
     $categories = $this->modx->getCollection('modCategory', array('category:LIKE' => 'UnitTest%'));
     foreach ($categories as $category) {
         $category->remove();
     }
     $this->modx->error->reset();
 }
开发者ID:rosstimson,项目名称:revolution,代码行数:13,代码来源:CategoryTest.php


示例9: tearDown

 /**
  * Cleanup data after this test.
  */
 public function tearDown()
 {
     parent::tearDown();
     $propertySets = $this->modx->getCollection('modPropertySet', array('name:LIKE' => '%UnitTest%'));
     /** @var modPropertySet $propertySet */
     foreach ($propertySets as $propertySet) {
         $propertySet->remove();
     }
     $this->modx->error->reset();
 }
开发者ID:rosstimson,项目名称:revolution,代码行数:13,代码来源:PropertySetTest.php


示例10: tearDown

 /**
  * Cleanup data after this test.
  */
 public function tearDown()
 {
     parent::tearDown();
     $plugins = $this->modx->getCollection('modPlugin', array('name:LIKE' => '%UnitTest%'));
     /** @var modPlugin $plugin */
     foreach ($plugins as $plugin) {
         $plugin->remove();
     }
     $this->modx->error->reset();
 }
开发者ID:rosstimson,项目名称:revolution,代码行数:13,代码来源:PluginTest.php


示例11: tearDown

 /**
  * Cleanup data after this test.
  */
 public function tearDown()
 {
     parent::tearDown();
     $templates = $this->modx->getCollection('modTemplate', array('templatename:LIKE' => '%UnitTest%'));
     /** @var modTemplate $template */
     foreach ($templates as $template) {
         $template->remove();
     }
     $this->modx->error->reset();
 }
开发者ID:rosstimson,项目名称:revolution,代码行数:13,代码来源:TemplateTest.php


示例12: setUp

 /**
  * Load some utility classes this case uses
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $this->modx->loadClass('modDashboard');
     $this->modx->loadClass('modDashboardWidget');
     $this->modx->loadClass('modManagerController', MODX_CORE_PATH . 'model/modx/', true, true);
     $this->modx->loadClass('modManagerControllerDeprecated', MODX_CORE_PATH . 'model/modx/', true, true);
     require_once MODX_MANAGER_PATH . 'controllers/default/welcome.class.php';
     $this->widget = $this->modx->newObject('modDashboardWidget');
     $this->widget->fromArray(array('name' => 'w_recentlyeditedresources', 'description' => 'w_recentlyeditedresources_desc', 'type' => 'file', 'size' => 'half', 'content' => '[[++manager_path]]controllers/default/dashboard/widget.grid-rer.php', 'namespace' => 'core', 'lexicon' => 'core:dashboards'));
 }
开发者ID:rossng,项目名称:revolution,代码行数:15,代码来源:modDashboardWidgetTest.php


示例13: tearDown

 /**
  * Cleanup data after this test.
  */
 public function tearDown()
 {
     parent::tearDown();
     if ($this->modx instanceof modX) {
         $resources = $this->modx->getCollection('modResource', array('pagetitle:LIKE' => '%Unit Test Resource%'));
         /** @var modResource $resource */
         foreach ($resources as $resource) {
             $resource->remove();
         }
     }
 }
开发者ID:rossng,项目名称:revolution,代码行数:14,代码来源:ResourceCreateTest.php


示例14: tearDown

 public function tearDown()
 {
     parent::tearDown();
     /** @var modResource $resource */
     $resource = $this->modx->getObject('modResource', array('pagetitle' => 'Unit Test Resource'));
     if ($resource) {
         $resource->remove();
     }
     $resource = $this->modx->getObject('modResource', array('pagetitle' => 'Unit Test Child Resource'));
     if ($resource) {
         $resource->remove();
     }
 }
开发者ID:ChrstnMgcn,项目名称:revolution,代码行数:13,代码来源:MakeUrlTest.php


示例15: tearDown

 /**
  * Cleanup data after this test.
  */
 public function tearDown()
 {
     parent::tearDown();
     /** @var modNamespace $namespace */
     $namespace = $this->modx->getObject('modNamespace', array('name' => 'unittest'));
     $namespace->remove();
     $actions = $this->modx->getCollection('modAction', array('namespace' => 'unittest'));
     /** @var modAction $action */
     foreach ($actions as $action) {
         $action->remove();
     }
     $this->modx->error->reset();
 }
开发者ID:rosstimson,项目名称:revolution,代码行数:16,代码来源:ActionTest.php


示例16: tearDown

 /**
  * Cleanup data after this test.
  */
 public function tearDown()
 {
     parent::tearDown();
     /** @var modContext $ctx */
     $ctx = $this->modx->getObject('modContext', 'unittest');
     if ($ctx) {
         $ctx->remove();
     }
     $settings = $this->modx->getCollection('modContextSetting', array('context_key' => 'unittest'));
     /** @var modContextSetting $setting */
     foreach ($settings as $setting) {
         $setting->remove();
     }
 }
开发者ID:ChrstnMgcn,项目名称:revolution,代码行数:17,代码来源:ContextSettingTest.php


示例17: tearDown

 /**
  * Cleanup data after each test.
  */
 public function tearDown()
 {
     parent::tearDown();
     $chunks = $this->modx->getCollection('modChunk', array('name:LIKE' => '%UnitTest%'));
     /** @var modChunk $chunk */
     foreach ($chunks as $chunk) {
         $chunk->remove();
     }
     /** @var modCategory $category */
     $category = $this->modx->getObject('modCategory', array('category' => 'UnitTestChunks'));
     if ($category) {
         $category->remove();
     }
     $this->modx->error->reset();
 }
开发者ID:jiripavlicek,项目名称:revolution,代码行数:18,代码来源:ChunkTest.php


示例18: tearDown

 /**
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     /** @var modNamespace $namespace */
     $namespace = $this->modx->getObject('modNamespace', array('name' => 'unit-test'));
     if ($namespace) {
         $namespace->remove();
     }
     $actions = $this->modx->getCollection('modAction', array('namespace' => 'unit-test'));
     /** @var modAction $action */
     foreach ($actions as $action) {
         $action->remove();
     }
     $this->modx->setOption('request_param_alias', 'q');
     $this->modx->setOption('request_param_id', 'id');
     $this->modx->setOption('site_start', 1);
     $this->modx->setOption('friendly_urls', true);
     $this->modx->setOption('container_suffix', '/');
 }
开发者ID:rossng,项目名称:revolution,代码行数:22,代码来源:modRequestTest.php


示例19: tearDown

 public function tearDown()
 {
     parent::tearDown();
     /* Remove test categories */
     $category = $this->modx->getIterator('modResource', array('pagetitle:LIKE' => '%UnitTest%'));
     /** @var msCategory $cat */
     foreach ($category as $cat) {
         $cat->remove();
     }
     $this->modx->query("ALTER TABLE " . $this->modx->getTableName('msCategory') . " AUTO_INCREMENT = 0;");
     /* Remove test options */
     $objs = $this->modx->getIterator('msOption', array('key:LIKE' => '%UnitTest%'));
     /** @var xPDOObject $obj */
     foreach ($objs as $obj) {
         $obj->remove();
     }
     $this->modx->query("ALTER TABLE " . $this->modx->getTableName('msOption') . " AUTO_INCREMENT = 0;");
     $this->modx->query("ALTER TABLE " . $this->modx->getTableName('msProductData') . " AUTO_INCREMENT = 0;");
     $this->modx->query("ALTER TABLE " . $this->modx->getTableName('msCategoryOption') . " AUTO_INCREMENT = 0;");
     $this->modx->query("ALTER TABLE " . $this->modx->getTableName('msProductOption') . " AUTO_INCREMENT = 0;");
 }
开发者ID:Vitaliz,项目名称:miniShop2,代码行数:21,代码来源:MODxProcessorTestCase.php


示例20: tearDown

 public function tearDown()
 {
     parent::tearDown();
     $this->modx->placeholders = array();
 }
开发者ID:kundius,项目名称:revolution,代码行数:5,代码来源:modXTest.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP MOXMAN类代码示例发布时间:2022-05-23
下一篇:
PHP MODbase类代码示例发布时间: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