public function test_deleteConfig() { $instance = new $this->myclass(); $item = new XoopsConfigItem(); $item->setDirty(); $item->setNew(); $item->setVar('conf_title', 'CONFTITLE_DUMMY_FOR_TESTS'); $value = $instance->insertConfig($item); $this->assertTrue(intval($value) > 0); $ret = $instance->deleteConfig($item); $this->assertSame(true, $ret); }
/** * Create a new {@link XoopsConfigItem} * * @see XoopsConfigItem * @param bool $isNew Flag the config as "new"? * @return object reference to the new config */ function &create($isNew = true) { $config = new XoopsConfigItem(); if ($isNew) { $config->setNew(); } return $config; }