Artesaos\SEOTools\SEOTools::generate PHP Method

generate() public method

Generate from all seo providers.
public generate ( boolean $minify = false ) : string
$minify boolean
return string
    public function generate($minify = false)
    {
        $html = $this->metatags()->generate();
        $html .= PHP_EOL;
        $html .= $this->opengraph()->generate();
        $html .= PHP_EOL;
        $html .= $this->twitter()->generate();
        return $minify ? str_replace(PHP_EOL, '', $html) : $html;
    }

Usage Example

Example #1
0
 /**
  * @param $expectedString
  */
 protected function setRightAssertion($expectedString)
 {
     $expectedDom = $this->makeDomDocument($expectedString);
     $actualDom = $this->makeDomDocument($this->seoTools->generate());
     $this->assertEquals($expectedDom->C14N(), $actualDom->C14N());
 }