Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
c664ce7f
Commit
c664ce7f
authored
May 26, 2016
by
Steve Müller
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2364 from Deltachaos/small-functional-test-case-formating
Add more information for failed queries in tests
parents
67ddb9b6
3d2b59c7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
DbalFunctionalTestCase.php
tests/Doctrine/Tests/DbalFunctionalTestCase.php
+9
-1
No files found.
tests/Doctrine/Tests/DbalFunctionalTestCase.php
View file @
c664ce7f
...
...
@@ -50,7 +50,15 @@ class DbalFunctionalTestCase extends DbalTestCase
$queries
=
""
;
$i
=
count
(
$this
->
_sqlLoggerStack
->
queries
);
foreach
(
array_reverse
(
$this
->
_sqlLoggerStack
->
queries
)
as
$query
)
{
$params
=
array_map
(
function
(
$p
)
{
if
(
is_object
(
$p
))
return
get_class
(
$p
);
else
return
"'"
.
$p
.
"'"
;
},
$query
[
'params'
]
?:
array
());
$params
=
array_map
(
function
(
$p
)
{
if
(
is_object
(
$p
))
{
return
get_class
(
$p
);
}
elseif
(
is_scalar
(
$p
))
{
return
"'"
.
$p
.
"'"
;
}
else
{
return
var_export
(
$p
,
true
);
}
},
$query
[
'params'
]
?:
array
());
$queries
.=
(
$i
+
1
)
.
". SQL: '"
.
$query
[
'sql'
]
.
"' Params: "
.
implode
(
", "
,
$params
)
.
PHP_EOL
;
$i
--
;
}
...
...
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