Commit ed7e88f5 by pupi1985

Added the qa_js tests

parent 944178c2
...@@ -155,4 +155,23 @@ class UtilStringTest extends PHPUnit_Framework_TestCase ...@@ -155,4 +155,23 @@ class UtilStringTest extends PHPUnit_Framework_TestCase
$this->assertFalse( qa_string_matches_one($this->strBasic, $nonMatches) ); $this->assertFalse( qa_string_matches_one($this->strBasic, $nonMatches) );
} }
function test__qa_js() {
$test = qa_js('test');
$this->assertEquals($test, "'test'");
$test = qa_js('test', true);
$this->assertEquals($test, "'test'");
$test = qa_js(123);
$this->assertEquals($test, 123);
$test = qa_js(123, true);
$this->assertEquals($test, "'123'");
$test = qa_js(true);
$this->assertEquals($test, 'true');
$test = qa_js(true, true);
$this->assertEquals($test, "'true'");
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment