當前位置: 首頁>>代碼示例>>PHP>>正文


PHP MODxTestCase類代碼示例

本文整理匯總了PHP中MODxTestCase的典型用法代碼示例。如果您正苦於以下問題:PHP MODxTestCase類的具體用法?PHP MODxTestCase怎麽用?PHP MODxTestCase使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了MODxTestCase類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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


注:本文中的MODxTestCase類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。