Skip to content

Commit aa3dc73

Browse files
committed
Tweak tests
1 parent dc5a4ad commit aa3dc73

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/Unit/Models/ModelScopeTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function test_has_scope()
5454

5555
public function test_scopes_are_applied_to_query()
5656
{
57-
$query = (new ModelWithGlobalScopeTestStub)->newQuery()->applyScopes();
57+
$query = ModelWithGlobalScopeTestStub::query();
5858

5959
$this->assertEquals([
6060
'field' => 'foo',
@@ -65,7 +65,7 @@ public function test_scopes_are_applied_to_query()
6565

6666
public function test_scopes_are_applied_to_pagination_request()
6767
{
68-
$query = (new ModelWithGlobalScopeTestStub)->newQuery();
68+
$query = ModelWithGlobalScopeTestStub::query();
6969

7070
$query->getConnection()
7171
->getLdapConnection()
@@ -83,7 +83,7 @@ public function test_scopes_are_applied_to_pagination_request()
8383

8484
public function test_scopes_are_not_stacked_multiple_times()
8585
{
86-
$query = (new ModelWithGlobalScopeTestStub)->newQuery();
86+
$query = ModelWithGlobalScopeTestStub::query();
8787
$query->getQuery();
8888
$query->getQuery();
8989

0 commit comments

Comments
 (0)