Example #1
0
 public function testPage()
 {
     $info = array('url' => 'http://mypage.com   ', 'title' => "Page \n  <strong>title</strong>\n", 'text' => 'Extended <strong>page description</strong> &amp; ', 'image' => 'http://mypage.com/image.png', 'twitterUser' => '@twitterUser');
     $infoNormalized = array('url' => 'http://mypage.com', 'title' => 'Page title', 'text' => 'Extended page description &', 'image' => 'http://mypage.com/image.png', 'twitterUser' => '@twitterUser');
     $page = new Page($info);
     $this->assertEquals($infoNormalized['url'], $page->getUrl());
     $this->assertEquals($infoNormalized['title'], $page->getTitle());
     $this->assertEquals($infoNormalized['text'], $page->getText());
     $this->assertEquals($infoNormalized['image'], $page->getImage());
     $this->assertEquals($infoNormalized['twitterUser'], $page->getTwitterUser());
     $this->assertEquals($infoNormalized, $page->get());
     return $page;
 }