Skip to content

Commit

Permalink
working on formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Mar 16, 2017
1 parent 81187d5 commit 2d4e1f0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 108 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PHPUnit_Framework_Constraint_Not as ReverseConstraint;
use Illuminate\Foundation\Testing\Constraints\HasInDatabase;
use Illuminate\Foundation\Testing\Constraints\HasSoftDeletedInDatabase;
use Illuminate\Foundation\Testing\Constraints\SoftDeletedInDatabase;

trait InteractsWithDatabase
{
Expand Down Expand Up @@ -45,17 +45,17 @@ protected function assertDatabaseMissing($table, array $data, $connection = null
}

/**
* Assert that a given where condition exists in the database.
* Assert the given record has been deleted.
*
* @param string $table
* @param array $data
* @param string $connection
* @return $this
*/
protected function assertDatabaseHasSoftDelete($table, array $data, $connection = null)
protected function assertSoftDeleted($table, array $data, $connection = null)
{
$this->assertThat(
$table, new HasSoftDeletedInDatabase($this->getConnection($connection), $data)
$table, new SoftDeletedInDatabase($this->getConnection($connection), $data)
);

return $this;
Expand Down

This file was deleted.

4 changes: 2 additions & 2 deletions tests/Foundation/FoundationInteractsWithDatabaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public function testSeeSoftDeletedInDatabaseFindsResults()
{
$this->mockCountBuilder(1);

$this->assertDatabaseHasSoftDelete($this->table, $this->data);
$this->assertSoftDeleted($this->table, $this->data);
}

/**
Expand All @@ -118,7 +118,7 @@ public function testSeeSoftDeletedInDatabaseDoesNotFindResults()

$builder->shouldReceive('get')->andReturn(collect());

$this->assertDatabaseHasSoftDelete($this->table, $this->data);
$this->assertSoftDeleted($this->table, $this->data);
}

protected function mockCountBuilder($countResult)
Expand Down

0 comments on commit 2d4e1f0

Please sign in to comment.