예제 #1
0
 function &create($isNew = true)
 {
     $tplfile = new XoopsTplfile();
     if ($isNew) {
         $tplfile->setNew();
     }
     return $tplfile;
 }
예제 #2
0
 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);
 }