当前位置: 首页>>代码示例>>PHP>>正文


PHP MODxTestCase::setUp方法代码示例

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


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

示例1: setUp

 public function setUp()
 {
     parent::setUp();
     $this->modx->loadClass('modProcessor', MODX_CORE_PATH . 'model/modx/', true, true);
     $this->processor = new modProcessor($this->modx);
     $this->processor->setPath(MODX_BASE_PATH . self::MODX_TEST_PROCESSOR);
 }
开发者ID:rossng,项目名称:revolution,代码行数:7,代码来源:modProcessorTes-skip-t.php

示例2: 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

示例3: setUp

 /**
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $this->modx->loadClass('sources.modMediaSource');
     $this->source = $this->modx->newObject('sources.modMediaSource');
     $this->source->fromArray(array('name' => 'UnitTestSource', 'description' => '', 'class_key' => 'sources.modFileMediaSource', 'properties' => array()), '', true);
 }
开发者ID:rossng,项目名称:revolution,代码行数:10,代码来源:modMediaSourceTest.php

示例4: setUp

 public function setUp()
 {
     parent::setUp();
     $this->template = $this->modx->newObject('modTemplate');
     $this->template->fromArray(array('id' => 12345, 'templatename' => 'Unit Test Template', 'description' => 'A template for unit testing.', 'content' => '<p>Hello, [[+name]]!</p>', 'category' => 0, 'locked' => 0), '', true, true);
     $this->template->setProperties(array('name' => 'John'));
     $this->template->setCacheable(false);
 }
开发者ID:rossng,项目名称:revolution,代码行数:8,代码来源:modTemplateTest.php

示例5: 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

示例6: 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

示例7: setUp

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

示例8: setUp

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

示例9: 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

示例10: setUp

 public function setUp()
 {
     parent::setUp();
     $this->plugin = $this->modx->newObject('modPlugin');
     $this->plugin->fromArray(array('id' => 12345, 'name' => 'Unit Test Plugin', 'description' => 'A plugin for unit testing.', 'plugincode' => 'return "Hello.";', 'category' => 0, 'locked' => false, 'disabled' => false), '', true, true);
     $this->plugin->setProperties(array('name' => 'John'));
     $this->plugin->setCacheable(false);
 }
开发者ID:rossng,项目名称:revolution,代码行数:8,代码来源:modPluginTest.php

示例11: 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

示例12: 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

示例13: setUp

 public function setUp()
 {
     parent::setUp();
     $this->chunk = $this->modx->newObject('modChunk');
     $this->chunk->fromArray(array('id' => 12345, 'name' => 'Unit Test Chunk', 'description' => 'A chunk for unit testing.', 'snippet' => '<p>Hello, [[+name]]!</p>', 'category' => 0, 'locked' => 0), '', true, true);
     $this->chunk->setProperties(array('name' => 'John'));
     $this->chunk->setCacheable(false);
 }
开发者ID:rosstimson,项目名称:revolution,代码行数:8,代码来源:modChunkTest.php

示例14: setUp

 /**
  * Setup some basic data for this test.
  */
 public function setUp()
 {
     parent::setUp();
     /** @var modContext $ctx */
     $ctx = $this->modx->newObject('modContext');
     $ctx->set('key', 'unittest');
     $ctx->set('description', 'The unit test context for context settings.');
     $ctx->save();
 }
开发者ID:ChrstnMgcn,项目名称:revolution,代码行数:12,代码来源:ContextSettingTest.php

示例15: setUp

 /**
  * Setup some basic data for this test.
  */
 public function setUp()
 {
     parent::setUp();
     $this->modx->error->reset();
     /** @var modTemplate $template */
     $template = $this->modx->newObject('modTemplate');
     $template->fromArray(array('templatename' => 'UnitTestTemplate'));
     $template->save();
 }
开发者ID:rosstimson,项目名称:revolution,代码行数:12,代码来源:TemplateTest.php


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