示例#1
0
 public function testExternalPrefix()
 {
     $d = new Kwf_Assets_Dependency_File_Scss(new Kwf_Assets_Dependency_EmptyProviderList(), 'kwf/tests/Kwf/Assets/Filter/PrefixerFontface/test3.scss');
     $map = $d->getContentsPacked();
     $filter = new Kwf_Assets_Filter_Css_PrefixerFontface('myWebsite-');
     $map = $filter->filter($map);
     $c = $map->getFileContents();
     $this->assertNotContains('myWebsite-', $c);
 }
示例#2
0
 public function testMaxWidth()
 {
     $d = new Kwf_Assets_Dependency_File_Scss(new Kwf_Assets_Dependency_EmptyProviderList(), 'kwf/tests/Kwf/Assets/Filter/MediaQueriesDropRedundant/test2.scss');
     $map = $d->getContentsPacked();
     $filter = new Kwf_Assets_Filter_Css_MediaQueriesDropRedundant();
     $map = $filter->filter($map);
     $c = $map->getFileContents();
     $this->assertEquals(1, substr_count($c, 'height:100px'));
 }
示例#3
0
 public function testAddPrefix()
 {
     $d = new Kwf_Assets_Dependency_File_Scss(new Kwf_Assets_Dependency_EmptyProviderList(), 'kwf/tests/Kwf/Assets/Filter/Autoprefixer/test1.scss');
     $map = $d->getContentsPacked();
     $filter = new Kwf_Assets_Filter_Css_Autoprefixer();
     $map = $filter->filter($map);
     $c = $map->getFileContents();
     $this->assertContains('-webkit-transform', $c);
 }
示例#4
0
 public function testRemovePrefix()
 {
     $d = new Kwf_Assets_Dependency_File_Scss(new Kwf_Assets_Dependency_EmptyProviderList(), 'kwf/tests/Kwf/Assets/Filter/UniquePrefix/test1.scss');
     $map = $d->getContentsPacked();
     $filter = new Kwf_Assets_Filter_Css_UniquePrefix('');
     $map = $filter->filter($map);
     $c = $map->getFileContents();
     $this->assertEquals('.test{color:red}', trim($c));
 }
示例#5
0
 public function testNotIe8()
 {
     $d = new Kwf_Assets_Dependency_File_Scss(new Kwf_Assets_Dependency_EmptyProviderList(), 'kwf/tests/Kwf/Assets/Filter/Ie8/test1.scss');
     $map = $d->getContentsPacked();
     $map->setMimeType('text/css');
     $filter = new Kwf_Assets_Filter_Css_Ie8Remove(false);
     $map = $filter->filter($map);
     $c = $map->getFileContents();
     $c = str_replace(array(" ", "\n"), '', $c);
     $this->assertEquals('p{color:green}@mediaprint{p{color:blue}}', $c);
 }
示例#6
0
 public function testCompass()
 {
     $f = new Kwf_Assets_Dependency_File_Scss(new Kwf_Assets_Dependency_EmptyProviderList(), 'kwf/tests/Kwf/Assets/DependencyScss/file3.scss');
     $c = $f->getContentsPacked()->getFileContents();
     $this->assertContains("body{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px}", trim($c));
 }