lithium\tests\cases\template\helper\HtmlTest::testNonInlineScriptsAndStyles PHP 메소드

testNonInlineScriptsAndStyles() 공개 메소드

Tests that script and style tags with 'inline' set to false are written to the rendering context instead of being returned directly.
    public function testNonInlineScriptsAndStyles()
    {
        $result = trim($this->context->scripts());
        $this->assertEmpty($result);
        $result = $this->html->script('application', array('inline' => false));
        $this->assertEmpty($result);
        $result = $this->context->scripts();
        $this->assertTags($result, array('script' => array('type' => 'text/javascript', 'src' => 'regex:/.*js\\/application\\.js/')));
        $result = trim($this->context->styles());
        $this->assertEmpty($result);
        $result = $this->html->style('base', array('inline' => false));
        $this->assertEmpty($result);
        $result = $this->context->styles();
        $this->assertTags($result, array('link' => array('rel' => 'stylesheet', 'type' => 'text/css', 'href' => 'regex:/.*css\\/base\\.css/')));
    }