Exemplo n.º 1
0
     print "</blockquote>";
     // try fetching the post
     print "<b>Attempting to fetch sample post from app.net...</b>\n";
     print "<blockquote>";
     $get = $app->getPost($create['id']);
     if (!$get || !$get['id'] || $get['id'] != $create['id'] || $get['text'] != $sampleText) {
         print "Error fetching sample post from ADN:\n";
         var_dump($get);
         exit;
     }
     print "Successfully retrieved the sample post from ADN, post ID is " . $get['id'] . "\n";
     print "</blockquote>";
     // try deleting the post
     print "<b>Attempting to delete the sample post from app.net...</b>\n";
     print "<blockquote>";
     $delete = $app->deletePost($create['id']);
     if (!$delete || !$delete['id'] || $delete['id'] != $create['id']) {
         print "Error deleting sample post from ADN:\n";
         var_dump($delete);
         exit;
     }
     print "Successfully deleted the sample post from ADN, post ID was " . $delete['id'] . "\n";
     print "</blockquote>";
     // more tests can/should be included here
     // done tests!
     print "<b>All test completed successfully!</b>\n";
     print "</pre>";
 } else {
     print "<hr />";
     print "<h3>Complete user data</h3>";
     echo '<pre style="font-weight:bold;font-size:16px">';