class GssFilterTest

@group integration

Hierarchy

  • class \Assetic\Test\Filter\GoogleClosure\GssFilterTest extends \Assetic\Test\Filter\GoogleClosure\PHPUnit_Framework_TestCase

Expanded class hierarchy of GssFilterTest

File

drupal/core/vendor/kriswallsmith/assetic/tests/Assetic/Test/Filter/GssFilterTest.php, line 20

Namespace

Assetic\Test\Filter\GoogleClosure
View source
class GssFilterTest extends \PHPUnit_Framework_TestCase {
  public function testCompile() {
    if (!isset($_SERVER['GSS_JAR'])) {
      $this
        ->markTestSkipped('There is no GSS_JAR environment variable.');
    }
    $input = <<<EOF
@def BG_COLOR rgb(235, 239, 249);
body {background-color: BG_COLOR;}
EOF;
    $expected = <<<EOF
body{background-color:#ebeff9}
EOF;
    $asset = new StringAsset($input);
    $asset
      ->load();
    $filter = new GssFilter($_SERVER['GSS_JAR']);
    $filter
      ->filterLoad($asset);
    $this
      ->assertEquals($expected, $asset
      ->getContent());
  }

}

Members