Exemplo n.º 1
0
 /**
  * Ensures that getAllPosts() provides expected behavior
  *
  * @return void
  */
 public function testGetAllPosts()
 {
     $posts = $this->_delicious->getAllPosts('zfSite');
     $this->assertType('Zend_Service_Delicious_PostList', $posts);
     foreach ($posts as $post) {
         $this->assertContains('zfSite', $post->getTags());
     }
 }
Exemplo n.º 2
0
     }
 case 'add_sync_start':
     if (!$p->User->vxIsLogin()) {
         die($p->URL->vxToRedirect($p->URL->vxGetLogin($p->URL->vxGetAddSync())));
         break;
     } else {
         $sync = array();
         $sync['status'] = 'default';
         if (isset($_POST['d_u']) && isset($_POST['d_p'])) {
             $del_user = fetch_single($_POST['d_u']);
             $del_pass = fetch_single($_POST['d_p']);
             if ($del_user != '' && $del_pass != '') {
                 require_once 'Zend/Service/Delicious.php';
                 $del = new Zend_Service_Delicious($del_user, $del_pass);
                 try {
                     $posts = $del->getAllPosts();
                 } catch (Zend_Service_Delicious_Exception $e) {
                     $posts = false;
                     $sync['status'] = 'error';
                 }
                 if ($posts) {
                     var_dump($posts);
                     $result = Add::vxSync($p->User, $p->db, $posts);
                     var_dump($result);
                 }
             } else {
                 $sync['status'] = 'default';
             }
         } else {
             $sync['status'] = 'default';
         }