Пример #1
0
    public function testaddJsWithAsterisk()
    {
        mkdir("/tmp/edge_files");
        $js = <<<JS
<script>
    function alert(){
        alert("edge");
    }
</script>
JS;
        $file = "/tmp/edge_files/file.js";
        file_put_contents($file, $js);
        touch($file, 5000);
        $js = <<<JS
<script>
    function alertAgain(){
        alert("edge");
    }
</script>
JS;
        $file1 = "/tmp/edge_files/file1.js";
        file_put_contents($file1, $js);
        touch($file1, 5000);
        $layout = new Layout(null, ["/tmp/edge_files/*"], []);
        $this->assertCount(1, $layout->getJsFiles());
        $this->assertEquals("/js/5000_d7cf2916fd9287fb6db2affddd59bce0.js", $layout->getjsScript());
    }