diff --git a/tests/Integration/Database/EloquentModelScopeTest.php b/tests/Integration/Database/EloquentModelScopeTest.php index 7ea822b42810..8fca382000a7 100644 --- a/tests/Integration/Database/EloquentModelScopeTest.php +++ b/tests/Integration/Database/EloquentModelScopeTest.php @@ -3,7 +3,7 @@ namespace Illuminate\Tests\Integration\Database; use Illuminate\Contracts\Database\Eloquent\Builder; -use Illuminate\Database\Eloquent\Attributes\Scope as NamedScope; +use Illuminate\Database\Eloquent\Attributes\Scope; use Illuminate\Database\Eloquent\Model; class EloquentModelScopeTest extends DatabaseTestCase @@ -37,7 +37,7 @@ public function scopeExists(Builder $builder) return $builder; } - #[NamedScope] + #[Scope] protected function existsAsWell(Builder $builder) { return $builder; diff --git a/tests/Integration/Database/EloquentNamedScopeAttributeTest.php b/tests/Integration/Database/EloquentNamedScopeAttributeTest.php index 5d1441a43e3a..8dfc37c6fa7e 100644 --- a/tests/Integration/Database/EloquentNamedScopeAttributeTest.php +++ b/tests/Integration/Database/EloquentNamedScopeAttributeTest.php @@ -21,7 +21,7 @@ protected function setUp(): void ); } - #[DataProvider('namedScopeDataProvider')] + #[DataProvider('scopeDataProvider')] public function test_it_can_query_named_scoped_from_the_query_builder(string $methodName) { $query = Fixtures\NamedScopeUser::query()->{$methodName}(true); @@ -29,7 +29,7 @@ public function test_it_can_query_named_scoped_from_the_query_builder(string $me $this->assertSame($this->query, $query->toRawSql()); } - #[DataProvider('namedScopeDataProvider')] + #[DataProvider('scopeDataProvider')] public function test_it_can_query_named_scoped_from_static_query(string $methodName) { $query = Fixtures\NamedScopeUser::{$methodName}(true); @@ -37,7 +37,7 @@ public function test_it_can_query_named_scoped_from_static_query(string $methodN $this->assertSame($this->query, $query->toRawSql()); } - public static function namedScopeDataProvider(): array + public static function scopeDataProvider(): array { return [ 'scope with return' => ['verified'], diff --git a/tests/Integration/Database/Fixtures/NamedScopeUser.php b/tests/Integration/Database/Fixtures/NamedScopeUser.php index b33b8823dc2e..d677aefab294 100644 --- a/tests/Integration/Database/Fixtures/NamedScopeUser.php +++ b/tests/Integration/Database/Fixtures/NamedScopeUser.php @@ -2,7 +2,7 @@ namespace Illuminate\Tests\Integration\Database\Fixtures; -use Illuminate\Database\Eloquent\Attributes\Scope as NamedScope; +use Illuminate\Database\Eloquent\Attributes\Scope; use Illuminate\Database\Eloquent\Builder; class NamedScopeUser extends User @@ -17,7 +17,7 @@ protected function casts(): array ]; } - #[NamedScope] + #[Scope] protected function verified(Builder $builder, bool $email = true) { return $builder->when( @@ -27,7 +27,7 @@ protected function verified(Builder $builder, bool $email = true) ); } - #[NamedScope] + #[Scope] protected function verifiedWithoutReturn(Builder $builder, bool $email = true) { $this->verified($builder, $email);