Browse Source

Add additional test for get() with uuid.

Mark Story 8 years ago
parent
commit
0719af87ee
1 changed files with 15 additions and 0 deletions
  1. 15 0
      tests/TestCase/ORM/TableUuidTest.php

+ 15 - 0
tests/TestCase/ORM/TableUuidTest.php

@@ -144,6 +144,21 @@ class TableUuidTest extends TestCase
      * @dataProvider uuidTableProvider
      * @return void
      */
+    public function testGetById($tableName)
+    {
+        $table = TableRegistry::get($tableName);
+        $entity = $table->find('all')->firstOrFail();
+
+        $result = $table->get($entity->id);
+        $this->assertSame($result->id, $entity->id);
+    }
+
+    /**
+     * Test delete with string pk.
+     *
+     * @dataProvider uuidTableProvider
+     * @return void
+     */
     public function testDelete($tableName)
     {
         $table = TableRegistry::get($tableName);