Skip to content

Commit

Permalink
Add a test for the removal of comments
Browse files Browse the repository at this point in the history
  • Loading branch information
stof committed Jul 22, 2016
1 parent b081b74 commit f3f5d83
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions tests/Css/ProcessorTest.php
Expand Up @@ -44,6 +44,31 @@ public function testCssWithOneRule()
$this->assertEquals(1, $rules[0]->getOrder());
}

public function testCssWithComments()
{
$css = <<<CSS
a {
padding: 5px;
display: block;
}
/* style the titles */
h1 {
color: rebeccapurple;
}
/* end of title styles */
CSS;

$rules = $this->processor->getRules($css);

$this->assertCount(2, $rules);
$this->assertEquals('a', $rules[0]->getSelector());
$this->assertCount(2, $rules[0]->getProperties());
$this->assertEquals(1, $rules[0]->getOrder());
$this->assertEquals('h1', $rules[1]->getSelector());
$this->assertCount(1, $rules[1]->getProperties());
$this->assertEquals(2, $rules[1]->getOrder());
}

public function testCssWithMediaQueries()
{
$css = <<<EOF
Expand Down

0 comments on commit f3f5d83

Please sign in to comment.