Skip to content

Commit

Permalink
Add additional test for get() with uuid.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Oct 20, 2017
1 parent a9745f1 commit 0719af8
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/TestCase/ORM/TableUuidTest.php
Expand Up @@ -138,6 +138,21 @@ public function testSaveUpdate($tableName)
$this->assertEquals($entity->toArray(), $row->toArray());
}

/**
* Test delete with string pk.
*
* @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.
*
Expand Down

0 comments on commit 0719af8

Please sign in to comment.