getCanonical() public method

Get the canonical URL.
public getCanonical ( ) : string
return string
コード例 #1
0
ファイル: SEOMetaTest.php プロジェクト: artesaos/seotools
 public function test_set_canonical()
 {
     $fullHeader = "<title>It's Over 9000!</title>";
     $fullHeader .= "<meta name=\"description\" content=\"For those who helped create the Genki Dama\">";
     $fullHeader .= "<link rel=\"canonical\" href=\"http://domain.com\"/>";
     $canonical = 'http://domain.com';
     $this->seoMeta->setCanonical($canonical);
     $this->setRightAssertion($fullHeader);
     $this->assertEquals($canonical, $this->seoMeta->getCanonical());
 }