JsMin = new JsMin(''); } /** * Cleans up the environment after running a test. */ protected function tearDown() { $this->JsMin = null; parent::tearDown(); } /** * Constructs the test case. */ public function __construct() {} /** * Tests JsMin->__construct() */ public function test__construct() { $this->JsMin->__construct(''); } /** * Tests JsMin::minify() */ public function testMinify() { $expect = "\nfunction foo(bar)\n{if(bar==2){return true;}else{return false;}}"; $javascript = ' function foo(bar) { if (bar == 2) { return true; } else { return false; } } '; $this->assertEquals($expect, JsMin::minify($javascript)); } }