Skip to content

Commit

Permalink
Use Query methods instead of digging into internals.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed May 27, 2016
1 parent 86e24ef commit 05fa655
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions tests/TestCase/Database/ExpressionTypeCastingIntegrationTest.php
Expand Up @@ -86,16 +86,12 @@ public function setUp()
protected function _insert()
{
$query = $this->connection->newQuery();
$values = $query
$query
->insert(['id', 'published', 'name'], ['id' => 'ordered_uuid'])
->into('ordered_uuid_items')
->clause('values');
$values
->values([
['id' => '481fc6d0-b920-43e0-a40d-6d1740cf8569', 'published' => 0, 'name' => 'Item 1'],
['id' => '48298a29-81c0-4c26-a7fb-413140cf8569', 'published' => 0, 'name' => 'Item 2'],
['id' => '482b7756-8da0-419a-b21f-27da40cf8569', 'published' => 0, 'name' => 'Item 3'],
]);
->values(['id' => '481fc6d0-b920-43e0-a40d-6d1740cf8569', 'published' => 0, 'name' => 'Item 1'])
->values(['id' => '48298a29-81c0-4c26-a7fb-413140cf8569', 'published' => 0, 'name' => 'Item 2'])
->values(['id' => '482b7756-8da0-419a-b21f-27da40cf8569', 'published' => 0, 'name' => 'Item 3']);

$query->execute();
}
Expand Down

0 comments on commit 05fa655

Please sign in to comment.