예제 #1
0
 /**
  * Cleanup data after this test.
  */
 public static function tearDownAfterClass() {
     $modx = MODxTestHarness::_getConnection();
     $template = $modx->getObject('modTemplate',array('templatename' => 'UnitTestTemplate'));
     if ($template) $template->remove();
     $template = $modx->getObject('modTemplate',array('templatename' => 'UnitTestTemplate2'));
     if ($template) $template->remove();
 }
예제 #2
0
 /**
  * Cleanup data after this test.
  */
 public static function tearDownAfterClass() {
     $modx = MODxTestHarness::_getConnection();
     $snippet = $modx->getObject('modSnippet',array('name' => 'UnitTestSnippet'));
     if ($snippet) $snippet->remove();
     $snippet = $modx->getObject('modSnippet',array('name' => 'UnitTestSnippet2'));
     if ($snippet) $snippet->remove();
 }
예제 #3
0
 /**
  * Cleanup data after this test.
  */
 public static function tearDownAfterClass() {
     $modx = MODxTestHarness::_getConnection();
     $tv = $modx->getObject('modTemplateVar',array('name' => 'UnitTestTv'));
     if ($tv) $tv->remove();
     $tv = $modx->getObject('modTemplateVar',array('name' => 'UnitTestTv2'));
     if ($tv) $tv->remove();
 }
예제 #4
0
 /**
  * Cleanup data after this test.
  */
 public static function tearDownAfterClass() {
     $modx = MODxTestHarness::_getConnection();
     $category = $modx->getObject('modCategory',array('category' => 'UnitTestCategory'));
     if ($category) $category->remove();
     $category = $modx->getObject('modCategory',array('category' => 'UnitTestCategory2'));
     if ($category) $category->remove();
 }
예제 #5
0
    /**
     * Cleanup data after this test.
     */
    public static function tearDownAfterClass() {
        $modx = MODxTestHarness::_getConnection();

        $namespace = $modx->getObject('modNamespace',array('name' => 'unittest'));
        $namespace->remove();
        $modx->removeCollection('modAction',array('namespace' => 'unittest'));
    }
예제 #6
0
 /**
  * Cleanup data after this test.
  */
 public static function tearDownAfterClass()
 {
     $modx = MODxTestHarness::_getConnection();
     $ctx = $modx->getObject('modContext', 'unittest');
     if ($ctx) {
         $ctx->remove();
     }
 }
예제 #7
0
 /**
  * Cleanup data after this test.
  */
 public static function tearDownAfterClass() {
     $modx = MODxTestHarness::_getConnection();
     $plugin = $modx->getObject('modPlugin',array('name' => 'UnitTestPlugin'));
     if ($plugin) $plugin->remove();
     $plugin = $modx->getObject('modPlugin',array('name' => 'UnitTestPlugin2'));
     if ($plugin) $plugin->remove();
     $plugin = $modx->getObject('modPlugin',array('name' => 'UnitTestPlugin3'));
     if ($plugin) $plugin->remove();
 }
예제 #8
0
 /**
  * Cleanup data after this test.
  */
 public static function tearDownAfterClass() {
     $modx = MODxTestHarness::_getConnection();
     $propertyset = $modx->getObject('modPropertySet',array('name' => 'UnitTestPropertySet'));
     if ($propertyset) $propertyset->remove();
     $propertyset = $modx->getObject('modPropertySet',array('name' => 'UnitTestPropertySet2'));
     if ($propertyset) $propertyset->remove();
     $propertyset = $modx->getObject('modPropertySet',array('name' => 'UnitTestPropertySet3'));
     if ($propertyset) $propertyset->remove();
 }
예제 #9
0
    /**
     * Cleanup data after this test.
     */
    public static function tearDownAfterClass() {
        $modx =& MODxTestHarness::_getConnection();
        $chunk = $modx->getObject('modChunk',array('name' => 'UnitTestChunk'));
        if ($chunk) $chunk->remove();
        $chunk = $modx->getObject('modChunk',array('name' => 'UnitTestChunk2'));
        if ($chunk) $chunk->remove();
        $chunk = $modx->getObject('modChunk',array('name' => 'UnitTestChunk3'));
        if ($chunk) $chunk->remove();
        $chunk = $modx->getObject('modChunk',array('name' => 'Untitled Chunk'));
        if ($chunk) $chunk->remove();

        $category = $modx->getObject('modCategory',array('category' => 'UnitTestChunks'));
        if ($category) $category->remove();
    }
예제 #10
0
 /**
  * Test data provider for getList processor
  */
 public function providerGetDirectoryList() {
     $modx = MODxTestHarness::_getConnection();
     return array(
         array('manager/',true),
         array('manager/assets',true),
         array('fakedirectory/',false),
         array('assets',true,$modx->getOption('manager_path'),$modx->getOption('manager_url')),
     );
 }
예제 #11
0
 /**
  * Ensure all tests have a reference to the MODX object
  */
 public function setUp() {
     $this->modx =& MODxTestHarness::_getConnection();
 }
예제 #12
0
파일: MODx.php 프로젝트: JoeBlow/revolution
 public function testVerifyMODx()
 {
     $modx = MODxTestHarness::_getConnection();
     $success = is_object($modx) && $modx instanceof modX;
     $this->assertTrue($success);
 }
예제 #13
0
 /**
  * Test data provider for getList processor
  */
 public function providerGetDirectoryList()
 {
     $this->modx = MODxTestHarness::_getConnection();
     return array(array('manager/', true), array('manager/assets', true), array('fakedirectory/', false), array('assets', true, MODX_BASE_PATH . 'manager/', MODX_BASE_URL . 'manager/'));
 }