Artesaos\SEOTools\TwitterCards::generate PHP Method

generate() public method

public generate ( boolean $minify = false ) : string
$minify boolean
return string
    public function generate($minify = false)
    {
        $this->eachValue($this->values);
        $this->eachValue($this->images, 'images');
        return $minify ? implode('', $this->html) : implode(PHP_EOL, $this->html);
    }

Usage Example

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