Skip to content

Commit

Permalink
Cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark committed Jan 23, 2018
1 parent c6be0ab commit 43f20f0
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tests/TestCase/ORM/TableTest.php
Expand Up @@ -6507,15 +6507,13 @@ public function testSaveOrFail()
{
$this->expectException(\Cake\ORM\Exception\PersistenceFailedException::class);
$this->expectExceptionMessage('Entity save failure.');

$entity = new Entity([
'foo' => 'bar'
]);
$table = TableRegistry::get('users');

$table->saveOrFail($entity);

$row = $table->find('all')->where(['foo' => 'bar'])->toArray();
$this->assertSame([], $row->toArray());
}

/**
Expand All @@ -6527,6 +6525,7 @@ public function testSaveOrFailErrorDisplay()
{
$this->expectException(\Cake\ORM\Exception\PersistenceFailedException::class);
$this->expectExceptionMessage('Entity save failure (field: "Some message", multiple: "one, two")');

$entity = new Entity([
'foo' => 'bar'
]);
Expand All @@ -6535,9 +6534,6 @@ public function testSaveOrFailErrorDisplay()
$table = TableRegistry::get('users');

$table->saveOrFail($entity);

$row = $table->find('all')->where(['foo' => 'bar'])->toArray();
$this->assertSame([], $row->toArray());
}

/**
Expand Down

0 comments on commit 43f20f0

Please sign in to comment.