Permalink
Browse files

Added tests for throwing exceptions.

  • Loading branch information...
1 parent c9a514a commit 2d662ecfb50378f2a08e36996e2815e2276068c5 @tedivm committed Jan 27, 2014
Showing with 16 additions and 0 deletions.
  1. +16 −0 tests/JShrink/Test/JShrinkTest.php
@@ -16,6 +16,22 @@
class JShrinkTest extends \PHPUnit_Framework_TestCase
{
/**
+ * @expectedException RuntimeException
+ */
+ public function testUnclosedCommentException()
+ {
+ \JShrink\Minifier::minify('/* This comment is hanging out.');
+ }
+
+ /**
+ * @expectedException RuntimeException
+ */
+ public function testUnclosedStringException()
+ {
+ \JShrink\Minifier::minify('var string = "This string is hanging out.');
+ }
+
+ /**
* @dataProvider JShrinkProvider
*/
public function testJShrink($testName, $unminified, $minified)

0 comments on commit 2d662ec

Please sign in to comment.