Пример #1
0
 public function testPipeline()
 {
     $this->assets->reset();
     //File not existing. Pipeline searches for that file without reaching it. Output is empty.
     $this->assets->add('test.css', null, true);
     $this->assets->setCssPipeline(true);
     $css = $this->assets->css();
     $this->assertSame('', $css);
     //Add a core Grav CSS file, which is found. Pipeline will now return a file
     $this->assets->add('/system/assets/debugger.css', null, true);
     $css = $this->assets->css();
     $this->assertContains('<link href=', $css);
     $this->assertContains('type="text/css" rel="stylesheet" />', $css);
 }