diff --git a/src/Illuminate/Database/Eloquent/SoftDeletingScope.php b/src/Illuminate/Database/Eloquent/SoftDeletingScope.php index e9cdcd4b872d..cf5ded1e8469 100644 --- a/src/Illuminate/Database/Eloquent/SoftDeletingScope.php +++ b/src/Illuminate/Database/Eloquent/SoftDeletingScope.php @@ -9,7 +9,7 @@ class SoftDeletingScope implements Scope * * @var array */ - protected $extensions = ['ForceDelete', 'Restore', 'WithTrashed', 'WithoutTrashed', 'OnlyTrashed']; + protected $extensions = ['Restore', 'WithTrashed', 'WithoutTrashed', 'OnlyTrashed']; /** * Apply the scope to a given Eloquent query builder. @@ -59,19 +59,6 @@ protected function getDeletedAtColumn(Builder $builder) return $builder->getModel()->getDeletedAtColumn(); } - /** - * Add the force delete extension to the builder. - * - * @param \Illuminate\Database\Eloquent\Builder $builder - * @return void - */ - protected function addForceDelete(Builder $builder) - { - $builder->macro('forceDelete', function (Builder $builder) { - return $builder->getQuery()->delete(); - }); - } - /** * Add the restore extension to the builder. * diff --git a/tests/Database/DatabaseSoftDeletingScopeTest.php b/tests/Database/DatabaseSoftDeletingScopeTest.php index de24797234b6..3ca8aa2e688d 100644 --- a/tests/Database/DatabaseSoftDeletingScopeTest.php +++ b/tests/Database/DatabaseSoftDeletingScopeTest.php @@ -23,20 +23,6 @@ public function testApplyingScopeToABuilder() $scope->apply($builder, $model); } - public function testForceDeleteExtension() - { - $builder = m::mock('Illuminate\Database\Eloquent\Builder'); - $builder->shouldDeferMissing(); - $scope = new \Illuminate\Database\Eloquent\SoftDeletingScope; - $scope->extend($builder); - $callback = $builder->getMacro('forceDelete'); - $givenBuilder = m::mock('Illuminate\Database\Eloquent\Builder'); - $givenBuilder->shouldReceive('getQuery')->andReturn($query = m::mock('StdClass')); - $query->shouldReceive('delete')->once(); - - $callback($givenBuilder); - } - public function testRestoreExtension() { $builder = m::mock('Illuminate\Database\Eloquent\Builder');