Exemple #1
0
 protected function tearDown()
 {
     $this->PDO->exec('DELETE FROM `' . PREFIX . 'training`');
     $this->PDO->exec('DELETE FROM `' . PREFIX . 'sport`');
     $this->PDO->exec('DELETE FROM `' . PREFIX . 'equipment_type`');
     $Factory = new Model\Factory(0);
     $Factory->clearCache('sport');
     \Cache::clean();
 }
Exemple #2
0
 private function checkForNewTags()
 {
     $Factory = new Model\Factory(\SessionAccountHandler::getId());
     $allTagIDs = array_map(function ($tag) {
         return $tag->id();
     }, $Factory->allTags());
     foreach ($this->TagArrayFromChosen as $key => $Tag) {
         if (!in_array($Tag, $allTagIDs)) {
             $this->setObjectwithTag($Tag);
             $this->TagArrayFromChosen[$key] = $this->insertNewTag();
         }
     }
     $Factory->clearCache('tag');
 }