Skip to content

Commit

Permalink
Fix failing tests.
Browse files Browse the repository at this point in the history
Because queries are not compiled when debugInfo is run, the parameters
may not be complete.
  • Loading branch information
markstory committed Aug 20, 2014
1 parent af6208c commit 16c8417
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
7 changes: 2 additions & 5 deletions tests/TestCase/Database/QueryTest.php
Expand Up @@ -2658,10 +2658,7 @@ public function testDebugInfo() {
->where(['id' => '1']);

$expected = [
'sql' => $query->sql(),
'params' => [
':c0' => ['value' => '1', 'type' => 'integer', 'placeholder' => 'c0']
],
'params' => [],
'defaultTypes' => ['id' => 'integer'],
'decorators' => 0,
'executed' => false
Expand All @@ -2671,7 +2668,6 @@ public function testDebugInfo() {

$query->execute();
$expected = [
'sql' => $query->sql(),
'params' => [
':c0' => ['value' => '1', 'type' => 'integer', 'placeholder' => 'c0']
],
Expand All @@ -2680,6 +2676,7 @@ public function testDebugInfo() {
'executed' => true
];
$result = $query->__debugInfo();
$this->assertEquals($result, $expected);
}

/**
Expand Down
1 change: 0 additions & 1 deletion tests/TestCase/ORM/QueryTest.php
Expand Up @@ -1835,7 +1835,6 @@ public function testDebugInfo() {
});

$expected = [
'sql' => $query->sql(),
'params' => $query->valueBinder()->bindings(),
'defaultTypes' => [
'authors.id' => 'integer',
Expand Down

0 comments on commit 16c8417

Please sign in to comment.