Пример #1
0
 public function testExportFavoritesOfServiceUser()
 {
     $more_data = array();
     $more_data[] = FixtureBuilder::build('favorites', array('post_id' => 44, 'fav_of_user_id' => 13, 'author_user_id' => 8, 'network' => 'twitter'));
     $favorites_file = THINKUP_WEBAPP_PATH . BackupDAO::CACHE_DIR . '/favorites.tmp';
     if (file_exists($favorites_file)) {
         unlink($favorites_file);
     }
     $this->assertFalse(file_exists($favorites_file));
     $favorite_posts_exported = $this->dao->exportFavoritesOfServiceUser(13, 'twitter', $favorites_file);
     //1 favorite posts exported
     $this->assertEqual($favorite_posts_exported, 1);
     $this->assertTrue(file_exists($favorites_file));
 }
Пример #2
0
 public function testExportFavoritesOfServiceUser()
 {
     $more_data = array();
     $more_data[] = FixtureBuilder::build('favorites', array('post_id' => 44, 'fav_of_user_id' => 13, 'author_user_id' => 8, 'network' => 'twitter'));
     $bkdir = FileDataManager::getBackupPath();
     $favorites_file = FileDataManager::getBackupPath('favorites.tmp');
     if (file_exists($favorites_file)) {
         unlink($favorites_file);
     }
     $this->assertFalse(file_exists($favorites_file));
     $favorite_posts_exported = $this->dao->exportFavoritesOfServiceUser(13, 'twitter', $favorites_file);
     //1 favorite posts exported
     $this->assertEqual($favorite_posts_exported, 1);
     $this->assertTrue(file_exists($favorites_file));
 }