summaryrefslogtreecommitdiffstats
path: root/tests/Utils
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Utils')
-rw-r--r--tests/Utils/MiscTest.php17
-rw-r--r--tests/Utils/QueryTest.php8
2 files changed, 24 insertions, 1 deletions
diff --git a/tests/Utils/MiscTest.php b/tests/Utils/MiscTest.php
index 55b9c91..da036e0 100644
--- a/tests/Utils/MiscTest.php
+++ b/tests/Utils/MiscTest.php
@@ -100,7 +100,22 @@ class MiscTest extends TestCase
'',
null,
array()
- )
+ ),
+ array(
+ 'SELECT * FROM orders AS ord WHERE 1',
+ 'db',
+ array(
+ 'db' => array(
+ 'alias' => null,
+ 'tables' => array(
+ 'orders' => array(
+ 'alias' => 'ord',
+ 'columns' => array(),
+ )
+ ),
+ ),
+ )
+ ),
);
}
}
diff --git a/tests/Utils/QueryTest.php b/tests/Utils/QueryTest.php
index e73696b..b3f0ab6 100644
--- a/tests/Utils/QueryTest.php
+++ b/tests/Utils/QueryTest.php
@@ -246,6 +246,14 @@ class QueryTest extends TestCase
'querytype' => 'SELECT'
)
),
+ array(
+ 'SELECT * FROM orders AS ord WHERE 1',
+ array(
+ 'querytype' => 'SELECT',
+ 'is_select' => true,
+ 'select_from' => true,
+ )
+ ),
);
}