public function setUp() { $this->requestAnalyzer = $this->prophesize(RequestAnalyzerInterface::class); $this->contentPath = $this->prophesize(ContentPathInterface::class); $this->seoTwigExtension = new SeoTwigExtension($this->requestAnalyzer->reveal(), $this->contentPath->reveal()); }
/** * Seo titel. */ public function testGetSeoMetaTagsFallback() { $extension = new MetaTwigExtension($this->requestAnalyzer->reveal(), $this->contentPath->reveal()); $metaTags = $extension->getSeoMetaTags(['seo' => ['title' => 'SEO Title', 'noIndex' => false, 'noFollow' => false, 'keywords' => 'SEO, Keywords'], 'excerpt' => ['description' => 'Excerpt Description']], ['title' => 'Page Title']); $this->assertEquals(['<meta name="description" content="Excerpt Description">', '<meta name="keywords" content="SEO, Keywords">', '<meta name="robots" content="INDEX, FOLLOW">'], explode(PHP_EOL, $metaTags)); }