Skip to content
Permalink
Browse files

Adding a help text in the Query __debugInfo

  • Loading branch information...
lorenzo committed May 15, 2015
1 parent 8977882 commit 94a27094944158c172326719e00926c8616bf638
Showing with 4 additions and 0 deletions.
  1. +1 −0 src/Database/Query.php
  2. +2 −0 tests/TestCase/Database/QueryTest.php
  3. +1 −0 tests/TestCase/ORM/QueryTest.php
@@ -1696,6 +1696,7 @@ public function __toString()
public function __debugInfo()
{
return [
'(help)' => 'This is a Query object, to get the results execute or iterate it.',
'sql' => $this->sql(),
'params' => $this->valueBinder()->bindings(),
'defaultTypes' => $this->defaultTypes(),
@@ -2949,6 +2949,7 @@ public function testDebugInfo()
->where(['id' => '1']);
$expected = [
'(help)' => 'This is a Query object, to get the results execute or iterate it.',
'sql' => $query->sql(),
'params' => [
':c0' => ['value' => '1', 'type' => 'integer', 'placeholder' => 'c0']
@@ -2962,6 +2963,7 @@ public function testDebugInfo()
$query->execute();
$expected = [
'(help)' => 'This is a Query object, to get the results execute or iterate it.',
'sql' => $query->sql(),
'params' => [
':c0' => ['value' => '1', 'type' => 'integer', 'placeholder' => 'c0']
@@ -2177,6 +2177,7 @@ public function testDebugInfo()
});
$expected = [
'(help)' => 'This is a Query object, to get the results execute or iterate it.',
'sql' => $query->sql(),
'params' => $query->valueBinder()->bindings(),
'defaultTypes' => [

0 comments on commit 94a2709

Please sign in to comment.
You can’t perform that action at this time.