Permalink
Browse files

Fixed tests

  • Loading branch information...
1 parent e545f0e commit 8a7637054b945c2fd5fbeece2cf98139fb79d8f3 @stloyd stloyd committed Feb 25, 2012
Showing with 45 additions and 21 deletions.
  1. +5 −1 .travis.yml
  2. +18 −6 Tests/EscapingTest.php
  3. +21 −13 Tests/PresetTest.php
  4. +1 −1 vendor/vendors.php
View
@@ -1,13 +1,17 @@
language: php
+
php:
+ - 5.3.2
- 5.3
- 5.4
+
env:
- SYMFONY_VERSION=v2.0.5
- SYMFONY_VERSION=origin/master
+
before_script: php vendor/vendors.php
-script: phpunit --coverage-text
+script: phpunit
notifications:
email:
@@ -15,17 +15,29 @@ public function setUp()
public function testHtmlEscaping()
{
- $text = '<a>a tag injection</a>';
- $html = '<p>&lt;a&gt;a tag injection&lt;/a&gt;</p>';
+ $text = <<<EOF
+<a>a tag injection</a>
+EOF;
- $this->assertSame($html, $this->parser->transform($text));
+ $html = <<<EOF
+<p>&lt;a&gt;a tag injection&lt;/a&gt;</p>
+
+EOF;
+
+ $this->assertEquals($html, $this->parser->transform($text));
}
public function testScriptEscaping()
{
- $text = '<script>alert("haha");</script>';
- $html = '&lt;script&gt;alert("haha");&lt;/script&gt;';
+ $text = <<<EOF
+<script>alert("haha");</script>
+EOF;
+
+ $html = <<<EOF
+&lt;script&gt;alert("haha");&lt;/script&gt;
+
+EOF;
- $this->assertSame($html, $this->parser->transform($text));
+ $this->assertEquals($html, $this->parser->transform($text));
}
}
View
@@ -23,19 +23,27 @@ public function testMedium()
$this->assertEquals($this->getHtml(), $parser->transform($this->getText()));
}
-// public function testMin()
-// {
-// $parser = new Preset\Min();
-//
-// $this->assertEquals($this->getHtml(), $parser->transform($this->getText()));
-// }
-
-// public function testLight()
-// {
-// $parser = new Preset\Light();
-//
-// $this->assertEquals($this->getHtml(), $parser->transform($this->getText()));
-// }
+ public function testMin()
+ {
+ $this->markTestIncomplete(
+ 'This test has not been implemented yet.'
+ );
+
+ $parser = new Preset\Min();
+
+ $this->assertEquals($this->getHtml(), $parser->transform($this->getText()));
+ }
+
+ public function testLight()
+ {
+ $this->markTestIncomplete(
+ 'This test has not been implemented yet.'
+ );
+
+ $parser = new Preset\Light();
+
+ $this->assertEquals($this->getHtml(), $parser->transform($this->getText()));
+ }
protected function getText()
{
View
@@ -5,7 +5,7 @@
$vendorDir = __DIR__;
$deps = array(
- array('symfony', 'http://github.com/symfony/symfony', isset($_SERVER['SYMFONY_VERSION']) ? $_SERVER['SYMFONY_VERSION'] : 'origin/master'),
+ array('symfony', 'https://github.com/symfony/symfony', isset($_SERVER['SYMFONY_VERSION']) ? $_SERVER['SYMFONY_VERSION'] : 'origin/master'),
);
foreach ($deps as $dep) {

0 comments on commit 8a76370

Please sign in to comment.