/** * 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(); }
/** * 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(); }
/** * 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(); }
/** * 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(); }
/** * 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')); }
/** * Cleanup data after this test. */ public static function tearDownAfterClass() { $modx = MODxTestHarness::_getConnection(); $ctx = $modx->getObject('modContext', 'unittest'); if ($ctx) { $ctx->remove(); } }
/** * 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(); }
/** * 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(); }
/** * 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(); }
/** * 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')), ); }
/** * Ensure all tests have a reference to the MODX object */ public function setUp() { $this->modx =& MODxTestHarness::_getConnection(); }
public function testVerifyMODx() { $modx = MODxTestHarness::_getConnection(); $success = is_object($modx) && $modx instanceof modX; $this->assertTrue($success); }
/** * 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/')); }