예제 #1
0
 public static function minify($type, $content)
 {
     if ($type == 'js') {
         $content = JSMin::minify($content);
     } else {
         $content = Css::minify($content);
     }
     return $content;
 }
예제 #2
0
파일: CssTest.php 프로젝트: jyxo/php
 /**
  * Tests the minify() method.
  *
  * @see \Jyxo\Css::minify()
  */
 public function testMinify()
 {
     $this->assertStringEqualsFile($this->filePath . '/minify-expected.css', Css::minify(file_get_contents($this->filePath . '/minify.css')));
     // Color conversion
     $this->assertEquals('background:url(\'image.png\') #000 top left;color:#999;border:solid 1px #cfc', Css::minify('background: url( \'image.png\' ) #000000 top left; color: #999999; border: solid 1px #ccffcc;'));
 }