Browse Source

Use Query methods instead of digging into internals.

Mark Story 9 years ago
parent
commit
05fa655d29
1 changed files with 4 additions and 8 deletions
  1. 4 8
      tests/TestCase/Database/ExpressionTypeCastingIntegrationTest.php

+ 4 - 8
tests/TestCase/Database/ExpressionTypeCastingIntegrationTest.php

@@ -86,16 +86,12 @@ class ExpressionTypeCastingIntegrationTest extends TestCase
     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();
     }