本文整理汇总了PHP中MODxTestCase::tearDown方法的典型用法代码示例。如果您正苦于以下问题:PHP MODxTestCase::tearDown方法的具体用法?PHP MODxTestCase::tearDown怎么用?PHP MODxTestCase::tearDown使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MODxTestCase
的用法示例。
在下文中一共展示了MODxTestCase::tearDown方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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();
}
}
示例2: 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();
}
示例3: 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();
}
示例4: 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();
}
示例5: 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();
}
示例6: 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();
}
}
}
示例7: 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();
}
示例8: 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();
}
}
示例9: 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();
}
}
示例10: 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();
}
示例11: 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', '/');
}
示例12: 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;");
}
示例13: tearDown
public function tearDown()
{
parent::tearDown();
$this->template = null;
}
示例14: tearDown
public function tearDown()
{
parent::tearDown();
$this->tv = null;
}
示例15: tearDown
public function tearDown()
{
parent::tearDown();
$this->controller = null;
}