public function testOverrideMetas() { $page = new SeoPage(); $page->setMetas(array('property' => array('foo' => 'bar', 'foo2' => array('bar2', array())))); $expected = array('property' => array('foo' => array('bar', array()), 'foo2' => array('bar2', array()))); $this->assertEquals($expected, $page->getMetas()); }
/** * Creates a concatenated list of keywords based on sonatas default * values. * * @param string $contentKeywords * * @return string */ private function createKeywords($contentKeywords) { $metas = $this->sonataPage->getMetas(); $sonataKeywords = isset($metas['name']['keywords'][0]) ? $metas['name']['keywords'][0] : ''; return ('' !== $sonataKeywords ? $sonataKeywords . ', ' : '') . $contentKeywords; }