Commit 6bbdb4ef authored by Taddeus Kroes's avatar Taddeus Kroes

Added unit test for escape_value in SQL plugin.

parent cae50c0e
......@@ -90,6 +90,14 @@ class pQuerySqlTest extends PHPUnit_Framework_TestCase {
$this->assertEquals(__sql::escape_column('count(`foo`)'), 'COUNT(`foo`)');
}
function test_escape_value() {
$this->assertEquals("'foo'", __sql::escape_value("foo"));
}
function test_escape_value_escaped() {
$this->assertEquals("'foo'", __sql::escape_value("'foo'"));
}
function test_parse_columns_star() {
$sql = __sql::select('foo', '*', '', false);
$this->assertEquals($sql->query, "SELECT * FROM `foo` WHERE 1;");
......
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