Sets the canonical URL.
public setCanonical ( string $url ) : Artesaos\SEOTools\Contracts\SEOTools | ||
$url | string | |
return | Artesaos\SEOTools\Contracts\SEOTools |
public function test_set_canonical() { $this->seoTools->setCanonical('http://domain.com'); $expected = "<title>It's Over 9000!</title>"; $expected .= '<meta name="description" content="For those who helped create the Genki Dama">'; $expected .= '<link rel="canonical" href="http://domain.com"/>'; $expected .= '<meta property="og:title" content="Over 9000 Thousand!" />'; $expected .= '<meta property="og:description" content="For those who helped create the Genki Dama" />'; $this->setRightAssertion($expected); }