Artesaos\SEOTools\SEOTools::setDescription PHP Method

setDescription() public method

Setup description for all seo providers.
public setDescription ( $description ) : Artesaos\SEOTools\Contracts\SEOTools
$description
return Artesaos\SEOTools\Contracts\SEOTools
    public function setDescription($description)
    {
        $this->metatags()->setDescription($description);
        $this->opengraph()->setDescription($description);
        $this->twitter()->setDescription($description);
        return $this;
    }

Usage Example

Esempio n. 1
0
 public function test_set_description()
 {
     $this->seoTools->setDescription('Kamehamehaaaaaaa');
     $expected = "<title>It's Over 9000!</title>";
     $expected .= '<meta name="description" content="Kamehamehaaaaaaa">';
     $expected .= '<meta property="og:description" content="Kamehamehaaaaaaa" />';
     $expected .= '<meta property="og:title" content="Over 9000 Thousand!" />';
     $expected .= '<meta name="twitter:description" content="Kamehamehaaaaaaa" />';
     $this->setRightAssertion($expected);
 }