本文整理汇总了PHP中Zend\View\Renderer\PhpRenderer::headLink方法的典型用法代码示例。如果您正苦于以下问题:PHP PhpRenderer::headLink方法的具体用法?PHP PhpRenderer::headLink怎么用?PHP PhpRenderer::headLink使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend\View\Renderer\PhpRenderer
的用法示例。
在下文中一共展示了PhpRenderer::headLink方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testViewHelperPersist
public function testViewHelperPersist()
{
$view = new PhpRenderer();
$view->setHelperPluginManager($this->serviceManager->get('ViewHelperManager'));
$view->dojo()->activate();
$headLink = $view->headLink();
$this->assertEquals('js/dojo_rel/dojo/resources/dojo.css', $headLink[0]->href);
$this->assertEquals('screen', $headLink[0]->media);
$this->assertEquals('stylesheet', $headLink[0]->rel);
$this->assertEquals('text/css', $headLink[0]->type);
$this->assertEquals('js/dojo_rel/dijit/themes/claro/claro.css', $headLink[1]->href);
$this->assertEquals('screen', $headLink[1]->media);
$this->assertEquals('stylesheet', $headLink[1]->rel);
$this->assertEquals('text/css', $headLink[1]->type);
$headScript = $view->headScript();
$this->assertEquals('async: true, baseUrl: "js/dojo_rel/dojo"', $headScript[0]->attributes['data-dojo-config']);
$this->assertEquals('js/dojo_rel/dojo/dojo.js', $headScript[0]->attributes['src']);
$this->assertEquals('text/javascript', $headScript[0]->type);
$this->assertEquals("require(['dojo/parser', 'dojo/domReady!'], function(parser) {parser.parse();})", $headScript[1]->source);
$this->assertEquals('text/javascript', $headScript[1]->type);
$this->assertEquals('claro', $view->dojo()->getTheme());
}