Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pquery
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
pquery
Commits
6bbdb4ef
Commit
6bbdb4ef
authored
Dec 06, 2011
by
Taddeus Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added unit test for escape_value in SQL plugin.
parent
cae50c0e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
test/sql.php
test/sql.php
+8
-0
No files found.
test/sql.php
View file @
6bbdb4ef
...
...
@@ -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;"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment