Activity = new Activity(1, 1); } /** * Cleans up the environment after running a test. */ protected function tearDown() { $this->Activity = null; parent::tearDown(); } /** * Constructs the test case. */ public function __construct() {} /** * Tests Activity->__construct() */ public function test__construct() { $this->Activity->__construct(1, 1); } /** * Tests Activity->getAppId() */ public function testGetAppId() { $this->Activity->setAppId(1); $this->assertEquals(1, $this->Activity->getAppId()); } /** * Tests Activity->getBody() */ public function testGetBody() { $testStr = 'test me'; $this->Activity->setBody($testStr); $this->assertEquals($testStr, $this->Activity->getBody()); } /** * Tests Activity->getBodyId() */ public function testGetBodyId() { $bodyId = '123'; $this->Activity->setBodyId($bodyId); $this->assertEquals($bodyId, $this->Activity->getBodyId()); } /** * Tests Activity->getExternalId() */ public function testGetExternalId() { $extId = '456'; $this->Activity->setExternalId($extId); $this->assertEquals($extId, $this->Activity->getExternalId()); } /** * Tests Activity->getId() */ public function testGetId() { $this->assertEquals(1, $this->Activity->getId()); } /** * Tests Activity->getMediaItems() */ public function testGetMediaItems() { $mediaItems = array('foo' => 'bar'); $this->Activity->setMediaItems($mediaItems); $this->assertEquals($mediaItems, $this->Activity->getMediaItems()); } /** * Tests Activity->getPostedTime() */ public function testGetPostedTime() { $time = time(); $this->Activity->setPostedTime($time); $this->assertEquals($time, $this->Activity->getPostedTime()); } /** * Tests Activity->getPriority() */ public function testGetPriority() { $priority = 1; $this->Activity->setPriority($priority); $this->assertEquals($priority, $this->Activity->getPriority()); } /** * Tests Activity->getStreamFaviconUrl() */ public function testGetStreamFaviconUrl() { $url = 'http://www.google.com/ig/modules/horoscope_content/virgo.gif'; $this->Activity->setStreamFaviconUrl($url); $this->assertEquals($url, $this->Activity->getStreamFaviconUrl()); } /** * Tests Activity->getStreamSourceUrl() */ public function testGetStreamSourceUrl() { $url = 'http://api.example.org/activity/foo/1'; $this->Activity->setStreamSourceUrl($url); $this->assertEquals($url, $this->Activity->getStreamSourceUrl()); } /** * Tests Activity->getStreamTitle() */ public function testGetStreamTitle() { $title = 'Foo Activity'; $this->Activity->setStreamTitle($title); $this->assertEquals($title, $this->Activity->getStreamTitle()); } /** * Tests Activity->getStreamUrl() */ public function testGetStreamUrl() { $streamUrl = 'http://api.example.org/activityStream/foo/1'; $this->Activity->setStreamUrl($streamUrl); $this->assertEquals($streamUrl, $this->Activity->getStreamUrl()); } /** * Tests Activity->getTemplateParams() */ public function testGetTemplateParams() { $params = array('fooParam' => 'barParam'); $this->Activity->setTemplateParams($params); $this->assertEquals($params, $this->Activity->getTemplateParams()); } /** * Tests Activity->getTitle() */ public function testGetTitle() { $title = 'Foo Activity Title'; $this->Activity->setTitle($title); $this->assertEquals($title, $this->Activity->getTitle()); } /** * Tests Activity->getTitleId() */ public function testGetTitleId() { $titleId = '976'; $this->Activity->setTitleId($titleId); $this->assertEquals($titleId, $this->Activity->getTitleId()); } /** * Tests Activity->getUrl() */ public function testGetUrl() { $url = 'http://api.example.org/url'; $this->Activity->setUrl($url); $this->assertEquals($url, $this->Activity->getUrl()); } /** * Tests Activity->getUserId() */ public function testGetUserId() { $this->assertEquals(1, $this->Activity->getUserId()); } }