Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Dec 7, 2017
2 parents 5bf7d63 + 7bdf867 commit ea5d6c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion tests/Database/DatabaseQueryBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1583,7 +1583,6 @@ public function testDeleteMethod()
$result = $builder->from('users')->where('email', '=', 'foo')->orderBy('id')->take(1)->delete();
$this->assertEquals(1, $result);


$builder = $this->getMySqlBuilder();
$builder->getConnection()->shouldReceive('delete')->once()->with('delete from `users` where `email` = ? order by `id` asc limit 1', ['foo'])->andReturn(1);
$result = $builder->from('users')->where('email', '=', 'foo')->orderBy('id')->take(1)->delete();
Expand Down
6 changes: 3 additions & 3 deletions tests/Integration/Database/EloquentDeleteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ public function setUp()

public function testOnlyDeleteWhatGiven()
{
for($i = 1; $i <= 10; $i++) {
for ($i = 1; $i <= 10; $i++) {
Comment::create([
'post_id' => Post::create()->id
'post_id' => Post::create()->id,
]);
}

Post::latest('id')->limit(1)->delete();
$this->assertEquals(9, Post::all()->count());

Expand Down

0 comments on commit ea5d6c0

Please sign in to comment.