/** * @group create * @group nc */ public function testCreate() { $subject = "Here is the subject of a broadcast message. " . rand(1, 100000); $body = "Here is the body of a broadcast message."; $result = NingApi::instance()->broadcastMessage->createMessage($subject, $body); $this->assertTrue($result['success']); }
public function testCount_old() { date_default_timezone_set("UTC"); $date = date("Y-m-d\\TH:i:s\\Z", strtotime("-2 days")); $path = sprintf("Activity/count?createdAfter=%s", $date); $result = NingApi::instance()->get($path); $this->assertTrue($result['success']); }
public function testAlpha_old() { $count = 3; $fields = "name"; $path = sprintf("Network/alpha?count=%s&fields=%s", $count, $fields); $result = NingApi::instance()->get($path); $this->assertTrue($result['success']); }
/** * @group delete */ public function testDelete() { $args = array(); $blogPosts = NingApi::instance()->blogPost->fetchNRecent(); $args['attachedTo'] = $blogPosts['entry'][0]['id']; $args['description'] = "This is a test comment."; $newComment = NingApi::instance()->comment->create($args); $args = array('id' => $newComment['id']); $result = NingApi::instance()->comment->delete($args); $this->assertTrue($result['success']); }
protected function fetchAlphabetical($args = array()) { $path = $this->objectKey . '/' . self::ALPHA; $this->addDefaultFields($args); return NingApi::instance()->get($path, $args); }
private function getContentId() { $client = NingApi::instance(); $result = $client->blogPost->fetchNRecent(self::FETCH_COUNT); return $result['entry'][0]['id']; }
public function testFetchRecentNextPage() { $result = NingApi::instance()->friend->fetchRecentNextPage(); $this->assertTrue($result['success']); }