class ScssphpFilterTest

@group integration

Hierarchy

  • class \Assetic\Test\Filter\ScssphpFilterTest extends \Assetic\Test\Filter\PHPUnit_Framework_TestCase

Expanded class hierarchy of ScssphpFilterTest

File

drupal/core/vendor/kriswallsmith/assetic/tests/Assetic/Test/Filter/ScssphpFilterTest.php, line 21

Namespace

Assetic\Test\Filter
View source
class ScssphpFilterTest extends \PHPUnit_Framework_TestCase {
  protected function setUp() {
    $this->filter = new ScssphpFilter();
  }
  public function testFilterLoad() {
    $expected = <<<EOF
.foo .bar {
  width: 2; }

EOF;
    $asset = new StringAsset('.foo{.bar{width:1+ 1;}}');
    $asset
      ->load();
    $this->filter
      ->filterLoad($asset);
    $this
      ->assertEquals($expected, $asset
      ->getContent(), '->filterLoad() parses the content');
  }
  public function testImport() {
    $expected = <<<EOF
.foo {
  color: blue; }

.foo {
  color: red; }

EOF;
    $asset = new FileAsset(__DIR__ . '/fixtures/sass/main.scss');
    $asset
      ->load();
    $this->filter
      ->filterLoad($asset);
    $this
      ->assertEquals($expected, $asset
      ->getContent(), '->filterLoad() sets an include path based on source url');
  }

}

Members