We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1cb0a77 commit a9745f1Copy full SHA for a9745f1
tests/TestCase/ORM/TableUuidTest.php
@@ -146,13 +146,12 @@ public function testSaveUpdate($tableName)
146
*/
147
public function testDelete($tableName)
148
{
149
- $id = '481fc6d0-b920-43e0-a40d-6d1740cf8569';
150
$table = TableRegistry::get($tableName);
151
- $entity = $table->find('all')->where(['id' => $id])->first();
+ $entity = $table->find('all')->firstOrFail();
152
153
$this->assertTrue($table->delete($entity));
154
- $query = $table->find('all')->where(['id' => $id]);
155
- $this->assertCount(0, $query->execute(), 'No rows left');
+ $query = $table->find('all')->where(['id' => $entity->id]);
+ $this->assertEmpty($query->first(), 'No row left');
156
}
157
158
/**
0 commit comments