예제 #1
0
 protected function setUp()
 {
     if ($GLOBALS['unittestUrl'] === null) {
         $this->assertTrue(false, 'Unittest URL not set in config');
     }
     if ($this->urlPart === null) {
         $this->assertTrue(false, 'Set the urlPart variable');
     }
     $this->url = $GLOBALS['unittestUrl'] . $this->urlPart;
     //clean up before test
     $configFile = $GLOBALS['datadir'] . '/config.testing-tmp.php';
     if (file_exists($configFile)) {
         unlink($configFile);
     }
     $this->us = SemanticScuttle_Service_Factory::get('User');
     $this->us->deleteAll();
     $this->bs = SemanticScuttle_Service_Factory::get('Bookmark');
     $this->bs->deleteAll();
     $this->b2t = SemanticScuttle_Service_Factory::get('Bookmark2Tag');
     $this->b2t->deleteAll();
 }