/** * */ public function testValidateOk() { $this->newsEntity->setTitle('test')->setPublicationName('test')->setPublicationLanguage('en')->setAccess('Subscription')->setGenres('PressRelease, Satire, Blog, OpEd, Opinion, UserGenerated'); $this->assertEquals($this->newsEntity->validate(), $this->newsEntity); }
/** * */ public function testValidateOk() { $image = new ImageEntity(); $image->setLocation('http://test.com/image.png'); $video = new VideoEntity(); $video->setThumbnailLoc('http://test.com/video.png')->setTitle('test')->setDescription('test')->setContentLoc('http://test.com/video.avi'); $news = new NewsEntity(); $news->setTitle('test')->setPublicationName('test')->setPublicationLanguage('en')->setAccess('Subscription')->setGenres('PressRelease'); $this->locationEntity->setLocation('http://test.com/')->setLastmod(new \DateTime())->setChangefreq('always')->setPriority(0.5)->addImage($image)->addVideo($video)->addNews($news); $this->assertEquals($this->locationEntity->validate(), $this->locationEntity); }