function &create($isNew = true) { $tplfile = new XoopsTplfile(); if ($isNew) { $tplfile->setNew(); } return $tplfile; }
public function test_deleteTpl() { $instance = new $this->myclass($this->conn); $source = new XoopsTplfile(); $source->setDirty(); $source->setNew(); $source->setVar('tpl_desc', 'TPL_DESC_DUMMY_TEST'); $value = $instance->insertTpl($source); $this->assertSame(true, $value); $value = $instance->deleteTpl($source); $this->assertSame(true, $value); }