From b0b0eb128fbdd43de8f395f716677c261387ec6b Mon Sep 17 00:00:00 2001 From: lotyp Date: Thu, 30 May 2024 20:20:57 +0300 Subject: [PATCH] fix: use self accessor, as test classes are final --- composer.lock | 135 ++++++++++-------- tests/src/ActiveRecordTest.php | 52 +++---- .../Bootloader/ActiveRecordBootloaderTest.php | 2 +- tests/src/FacadeTest.php | 6 +- tests/src/Query/ActiveQueryTest.php | 2 +- 5 files changed, 105 insertions(+), 92 deletions(-) diff --git a/composer.lock b/composer.lock index bafc7d7..274044b 100644 --- a/composer.lock +++ b/composer.lock @@ -4172,20 +4172,21 @@ }, { "name": "buggregator/trap", - "version": "1.6.1", + "version": "v1.8.0", "source": { "type": "git", "url": "https://github.com/buggregator/trap.git", - "reference": "b6ad65463b55afd0670b46b96b95197f2061e573" + "reference": "3ec674ad19ce2ee55ec4c972aafb71180621df12" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/buggregator/trap/zipball/b6ad65463b55afd0670b46b96b95197f2061e573", - "reference": "b6ad65463b55afd0670b46b96b95197f2061e573", + "url": "https://api.github.com/repos/buggregator/trap/zipball/3ec674ad19ce2ee55ec4c972aafb71180621df12", + "reference": "3ec674ad19ce2ee55ec4c972aafb71180621df12", "shasum": "" }, "require": { "clue/stream-filter": "^1.6", + "ext-filter": "*", "ext-sockets": "*", "nunomaduro/termwind": "^1.15 || ^2", "nyholm/psr7": "^1.8", @@ -4199,10 +4200,19 @@ }, "require-dev": { "dereuromark/composer-prefer-lowest": "^0.1.10", + "ergebnis/phpunit-slow-test-detector": "^2.14", + "friendsofphp/php-cs-fixer": "^3.54", "google/protobuf": "^3.23", - "phpunit/phpunit": "^10.4", + "pestphp/pest": "^2.34", + "phpstan/extension-installer": "^1.3", + "phpstan/phpstan": "^1.10", + "phpstan/phpstan-deprecation-rules": "^1.1", + "phpstan/phpstan-phpunit": "^1.3", + "phpstan/phpstan-strict-rules": "^1.5", + "phpunit/phpunit": "^10.5", "roxblnfk/unpoly": "^1.8.1", - "vimeo/psalm": "^5.11" + "vimeo/psalm": "^5.11", + "wayofdev/cs-fixer-config": "^1.4" }, "suggest": { "ext-simplexml": "To load trap.xml", @@ -4251,7 +4261,7 @@ ], "support": { "issues": "https://github.com/buggregator/trap/issues", - "source": "https://github.com/buggregator/trap/tree/1.6.1" + "source": "https://github.com/buggregator/trap/tree/v1.8.0" }, "funding": [ { @@ -4267,7 +4277,7 @@ "type": "patreon" } ], - "time": "2024-05-04T20:21:09+00:00" + "time": "2024-05-29T18:07:38+00:00" }, { "name": "carbonphp/carbon-doctrine-types", @@ -4634,16 +4644,16 @@ }, { "name": "composer/pcre", - "version": "3.1.3", + "version": "3.1.4", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "5b16e25a5355f1f3afdfc2f954a0a80aec4826a8" + "reference": "04229f163664973f68f38f6f73d917799168ef24" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/5b16e25a5355f1f3afdfc2f954a0a80aec4826a8", - "reference": "5b16e25a5355f1f3afdfc2f954a0a80aec4826a8", + "url": "https://api.github.com/repos/composer/pcre/zipball/04229f163664973f68f38f6f73d917799168ef24", + "reference": "04229f163664973f68f38f6f73d917799168ef24", "shasum": "" }, "require": { @@ -4685,7 +4695,7 @@ ], "support": { "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.1.3" + "source": "https://github.com/composer/pcre/tree/3.1.4" }, "funding": [ { @@ -4701,7 +4711,7 @@ "type": "tidelift" } ], - "time": "2024-03-19T10:26:25+00:00" + "time": "2024-05-27T13:40:54+00:00" }, { "name": "composer/semver", @@ -6007,16 +6017,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.57.2", + "version": "v3.58.1", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "22f7f3145606df92b02fb1bd22c30abfce956d3c" + "reference": "04e9424025677a86914b9a4944dbbf4060bb0aff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/22f7f3145606df92b02fb1bd22c30abfce956d3c", - "reference": "22f7f3145606df92b02fb1bd22c30abfce956d3c", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/04e9424025677a86914b9a4944dbbf4060bb0aff", + "reference": "04e9424025677a86914b9a4944dbbf4060bb0aff", "shasum": "" }, "require": { @@ -6095,7 +6105,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.57.2" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.58.1" }, "funding": [ { @@ -6103,7 +6113,7 @@ "type": "github" } ], - "time": "2024-05-20T20:41:57+00:00" + "time": "2024-05-29T16:39:07+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -6158,7 +6168,7 @@ }, { "name": "illuminate/collections", - "version": "v11.8.0", + "version": "v11.9.2", "source": { "type": "git", "url": "https://github.com/illuminate/collections.git", @@ -6213,7 +6223,7 @@ }, { "name": "illuminate/conditionable", - "version": "v11.8.0", + "version": "v11.9.2", "source": { "type": "git", "url": "https://github.com/illuminate/conditionable.git", @@ -6259,16 +6269,16 @@ }, { "name": "illuminate/contracts", - "version": "v11.8.0", + "version": "v11.9.2", "source": { "type": "git", "url": "https://github.com/illuminate/contracts.git", - "reference": "8782f75e80ab3e6036842d24dbeead34a16f3a79" + "reference": "86c1331d0b06c59ca21723d8bfc9faaa19430b46" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/contracts/zipball/8782f75e80ab3e6036842d24dbeead34a16f3a79", - "reference": "8782f75e80ab3e6036842d24dbeead34a16f3a79", + "url": "https://api.github.com/repos/illuminate/contracts/zipball/86c1331d0b06c59ca21723d8bfc9faaa19430b46", + "reference": "86c1331d0b06c59ca21723d8bfc9faaa19430b46", "shasum": "" }, "require": { @@ -6303,11 +6313,11 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-04-17T14:09:55+00:00" + "time": "2024-05-21T17:42:34+00:00" }, { "name": "illuminate/macroable", - "version": "v11.8.0", + "version": "v11.9.2", "source": { "type": "git", "url": "https://github.com/illuminate/macroable.git", @@ -6353,16 +6363,16 @@ }, { "name": "illuminate/support", - "version": "v11.8.0", + "version": "v11.9.2", "source": { "type": "git", "url": "https://github.com/illuminate/support.git", - "reference": "8deb8ba65ed7dc4e3f7b9b64ab70456250454824" + "reference": "b214de11ad444b8868c3cc9f2cf86c3e6ae433c1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/support/zipball/8deb8ba65ed7dc4e3f7b9b64ab70456250454824", - "reference": "8deb8ba65ed7dc4e3f7b9b64ab70456250454824", + "url": "https://api.github.com/repos/illuminate/support/zipball/b214de11ad444b8868c3cc9f2cf86c3e6ae433c1", + "reference": "b214de11ad444b8868c3cc9f2cf86c3e6ae433c1", "shasum": "" }, "require": { @@ -6423,7 +6433,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-05-21T15:24:23+00:00" + "time": "2024-05-22T15:56:12+00:00" }, { "name": "infection/abstract-testframework-adapter", @@ -7008,16 +7018,16 @@ }, { "name": "nesbot/carbon", - "version": "3.3.1", + "version": "3.4.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "8ff64b92c1b1ec84fcde9f8bb9ff2ca34cb8a77a" + "reference": "8eab8983c83c30e0bacbef8d311e3f3b8172727f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/8ff64b92c1b1ec84fcde9f8bb9ff2ca34cb8a77a", - "reference": "8ff64b92c1b1ec84fcde9f8bb9ff2ca34cb8a77a", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/8eab8983c83c30e0bacbef8d311e3f3b8172727f", + "reference": "8eab8983c83c30e0bacbef8d311e3f3b8172727f", "shasum": "" }, "require": { @@ -7110,7 +7120,7 @@ "type": "tidelift" } ], - "time": "2024-05-01T06:54:22+00:00" + "time": "2024-05-24T14:26:34+00:00" }, { "name": "netresearch/jsonmapper", @@ -8130,16 +8140,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.11.1", + "version": "1.11.2", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "e524358f930e41a2b4cca1320e3b04fc26b39e0b" + "reference": "0d5d4294a70deb7547db655c47685d680e39cfec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e524358f930e41a2b4cca1320e3b04fc26b39e0b", - "reference": "e524358f930e41a2b4cca1320e3b04fc26b39e0b", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/0d5d4294a70deb7547db655c47685d680e39cfec", + "reference": "0d5d4294a70deb7547db655c47685d680e39cfec", "shasum": "" }, "require": { @@ -8184,7 +8194,7 @@ "type": "github" } ], - "time": "2024-05-15T08:00:59+00:00" + "time": "2024-05-24T13:23:04+00:00" }, { "name": "phpstan/phpstan-deprecation-rules", @@ -9165,16 +9175,16 @@ }, { "name": "react/promise", - "version": "v3.1.0", + "version": "v3.2.0", "source": { "type": "git", "url": "https://github.com/reactphp/promise.git", - "reference": "e563d55d1641de1dea9f5e84f3cccc66d2bfe02c" + "reference": "8a164643313c71354582dc850b42b33fa12a4b63" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/promise/zipball/e563d55d1641de1dea9f5e84f3cccc66d2bfe02c", - "reference": "e563d55d1641de1dea9f5e84f3cccc66d2bfe02c", + "url": "https://api.github.com/repos/reactphp/promise/zipball/8a164643313c71354582dc850b42b33fa12a4b63", + "reference": "8a164643313c71354582dc850b42b33fa12a4b63", "shasum": "" }, "require": { @@ -9226,7 +9236,7 @@ ], "support": { "issues": "https://github.com/reactphp/promise/issues", - "source": "https://github.com/reactphp/promise/tree/v3.1.0" + "source": "https://github.com/reactphp/promise/tree/v3.2.0" }, "funding": [ { @@ -9234,7 +9244,7 @@ "type": "open_collective" } ], - "time": "2023-11-16T16:21:57+00:00" + "time": "2024-05-24T10:39:05+00:00" }, { "name": "react/socket", @@ -9510,12 +9520,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "7a1a6552ac2f0fd7131d2552be221f2dd6eb19fa" + "reference": "255803f702f07bee1a4edb0b079348c198603514" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/7a1a6552ac2f0fd7131d2552be221f2dd6eb19fa", - "reference": "7a1a6552ac2f0fd7131d2552be221f2dd6eb19fa", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/255803f702f07bee1a4edb0b079348c198603514", + "reference": "255803f702f07bee1a4edb0b079348c198603514", "shasum": "" }, "conflict": { @@ -9523,6 +9533,7 @@ "admidio/admidio": "<4.2.13", "adodb/adodb-php": "<=5.20.20|>=5.21,<=5.21.3", "aheinze/cockpit": "<2.2", + "aimeos/aimeos-core": ">=2022.04.1,<2022.10.17|>=2023.04.1,<2023.10.17|>=2024.04.1,<2024.04.7", "aimeos/aimeos-typo3": "<19.10.12|>=20,<20.10.5", "airesvsg/acf-to-rest-api": "<=3.1", "akaunting/akaunting": "<2.1.13", @@ -9724,6 +9735,7 @@ "funadmin/funadmin": "<=3.2|>=3.3.2,<=3.3.3", "gaoming13/wechat-php-sdk": "<=1.10.2", "genix/cms": "<=1.1.11", + "getformwork/formwork": "<1.13", "getgrav/grav": "<1.7.46", "getkirby/cms": "<4.1.1", "getkirby/kirby": "<=2.5.12", @@ -10030,7 +10042,7 @@ "silverstripe/admin": "<1.13.19|>=2,<2.1.8", "silverstripe/assets": ">=1,<1.11.1", "silverstripe/cms": "<4.11.3", - "silverstripe/comments": ">=1.3,<1.9.99|>=2,<2.9.99|>=3,<3.1.1", + "silverstripe/comments": ">=1.3,<3.1.1", "silverstripe/forum": "<=0.6.1|>=0.7,<=0.7.3", "silverstripe/framework": "<4.13.39|>=5,<5.1.11", "silverstripe/graphql": ">=2,<2.0.5|>=3,<3.8.2|>=4,<4.3.7|>=5,<5.1.3", @@ -10056,7 +10068,7 @@ "slim/psr7": "<1.4.1|>=1.5,<1.5.1|>=1.6,<1.6.1", "slim/slim": "<2.6", "slub/slub-events": "<3.0.3", - "smarty/smarty": "<3.1.48|>=4,<4.3.1", + "smarty/smarty": "<4.5.3|>=5,<5.1.1", "snipe/snipe-it": "<=6.2.2", "socalnick/scn-social-auth": "<1.15.2", "socialiteproviders/steam": "<1.1", @@ -10084,7 +10096,7 @@ "sylius/paypal-plugin": ">=1,<1.2.4|>=1.3,<1.3.1", "sylius/resource-bundle": ">=1,<1.3.14|>=1.4,<1.4.7|>=1.5,<1.5.2|>=1.6,<1.6.4", "sylius/sylius": "<1.9.10|>=1.10,<1.10.11|>=1.11,<1.11.2|>=1.12.0.0-alpha1,<1.12.16|>=1.13.0.0-alpha1,<1.13.1", - "symbiote/silverstripe-multivaluefield": ">=3,<3.0.99", + "symbiote/silverstripe-multivaluefield": ">=3,<3.1", "symbiote/silverstripe-queuedjobs": ">=3,<3.0.2|>=3.1,<3.1.4|>=4,<4.0.7|>=4.1,<4.1.2|>=4.2,<4.2.4|>=4.3,<4.3.3|>=4.4,<4.4.3|>=4.5,<4.5.1|>=4.6,<4.6.4", "symbiote/silverstripe-seed": "<6.0.3", "symbiote/silverstripe-versionedfiles": "<=2.0.3", @@ -10179,6 +10191,7 @@ "villagedefrance/opencart-overclocked": "<=1.11.1", "vova07/yii2-fileapi-widget": "<0.1.9", "vrana/adminer": "<4.8.1", + "vufind/vufind": ">=2,<9.1.1", "waldhacker/hcaptcha": "<2.1.2", "wallabag/tcpdf": "<6.2.22", "wallabag/wallabag": "<2.6.7", @@ -10299,7 +10312,7 @@ "type": "tidelift" } ], - "time": "2024-05-20T21:04:23+00:00" + "time": "2024-05-29T19:04:21+00:00" }, { "name": "sanmai/later", @@ -12632,16 +12645,16 @@ }, { "name": "wayofdev/cs-fixer-config", - "version": "v1.4.3", + "version": "v1.5.0", "source": { "type": "git", "url": "https://github.com/wayofdev/php-cs-fixer-config.git", - "reference": "662acfe478faf4d2472e1a871c3385b4256b6eba" + "reference": "1300d46e72b7893b038c429585206981820fb4e8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wayofdev/php-cs-fixer-config/zipball/662acfe478faf4d2472e1a871c3385b4256b6eba", - "reference": "662acfe478faf4d2472e1a871c3385b4256b6eba", + "url": "https://api.github.com/repos/wayofdev/php-cs-fixer-config/zipball/1300d46e72b7893b038c429585206981820fb4e8", + "reference": "1300d46e72b7893b038c429585206981820fb4e8", "shasum": "" }, "require": { @@ -12706,7 +12719,7 @@ "type": "github" } ], - "time": "2024-05-23T14:03:01+00:00" + "time": "2024-05-29T08:43:41+00:00" }, { "name": "webmozart/assert", diff --git a/tests/src/ActiveRecordTest.php b/tests/src/ActiveRecordTest.php index 6659d15..e839d96 100644 --- a/tests/src/ActiveRecordTest.php +++ b/tests/src/ActiveRecordTest.php @@ -20,12 +20,12 @@ final class ActiveRecordTest extends DatabaseTestCase public function it_finds_one_entity(): void { $user = User::findOne(['id' => 1]); - $this::assertNotNull($user); - $this::assertSame('Antony', $user->name); + self::assertNotNull($user); + self::assertSame('Antony', $user->name); $user = User::findOne(['name' => 'John']); - $this::assertNotNull($user); - $this::assertSame(2, $user->id); + self::assertNotNull($user); + self::assertSame(2, $user->id); } /** @@ -35,7 +35,7 @@ public function it_finds_one_entity(): void public function it_finds_all_entities(): void { $users = User::findAll(); - $this::assertCount(2, $users); + self::assertCount(2, $users); } /** @@ -45,12 +45,12 @@ public function it_finds_all_entities(): void public function it_finds_entity_by_primary_key(): void { $user = User::find(1); - $this::assertNotNull($user); - $this::assertSame('Antony', $user->name); + self::assertNotNull($user); + self::assertSame('Antony', $user->name); $user = User::find(2); - $this::assertNotNull($user); - $this::assertSame('John', $user->name); + self::assertNotNull($user); + self::assertSame('John', $user->name); } /** @@ -61,8 +61,8 @@ public function it_uses_query_to_select_entity(): void { $user = User::query()->where('id', 1)->fetchOne(); - $this::assertNotNull($user); - $this::assertSame('Antony', $user->name); + self::assertNotNull($user); + self::assertSame('Antony', $user->name); } /** @@ -75,12 +75,12 @@ public function it_saves_entity(): void { $user = new User('Alex'); - $this::assertTrue($user->save()->isSuccess()); - $this::assertCount(3, User::findAll()); + self::assertTrue($user->save()->isSuccess()); + self::assertCount(3, User::findAll()); $result = $this->selectEntity(User::class, cleanHeap: true)->wherePK($user->id)->fetchOne(); - $this::assertSame($result->name, $user->name); + self::assertSame($result->name, $user->name); } /** @@ -103,8 +103,8 @@ public function it_triggers_exception_when_tries_to_save_entity_using_save_or_fa $entityManager = $user->saveOrFail(); - $this::assertFalse($entityManager->isSuccess()); - $this::assertCount(2, User::findAll()); + self::assertFalse($entityManager->isSuccess()); + self::assertCount(2, User::findAll()); } /** @@ -124,13 +124,13 @@ public function it_persists_multiple_entities(): void $entityManager = Facade::getEntityManager(); $entityManager->run(); - $this::assertCount(4, User::findAll()); + self::assertCount(4, User::findAll()); $savedUserOne = $this->selectEntity(User::class, cleanHeap: true)->wherePK($userOne->id)->fetchOne(); - $this::assertSame($savedUserOne->name, $userOne->name); + self::assertSame($savedUserOne->name, $userOne->name); $savedUserTwo = $this->selectEntity(User::class, cleanHeap: true)->wherePK($userTwo->id)->fetchOne(); - $this::assertSame($savedUserTwo->name, $userTwo->name); + self::assertSame($savedUserTwo->name, $userTwo->name); } /** @@ -142,10 +142,10 @@ public function it_persists_multiple_entities(): void public function it_deletes_entity(): void { $user = User::find(1); - $this::assertNotNull($user); + self::assertNotNull($user); - $this::assertTrue($user->delete()->isSuccess()); - $this::assertCount(1, User::findAll()); + self::assertTrue($user->delete()->isSuccess()); + self::assertCount(1, User::findAll()); } /** @@ -164,12 +164,12 @@ public function it_deletes_multiple_entities_using_remove_method(): void $userOne->remove(); $userTwo->remove(); - $this::assertCount(2, User::findAll()); + self::assertCount(2, User::findAll()); $entityManager = Facade::getEntityManager(); - $this::assertTrue($entityManager->run()->isSuccess()); + self::assertTrue($entityManager->run()->isSuccess()); - $this::assertCount(0, User::findAll()); + self::assertCount(0, User::findAll()); } /** @@ -180,7 +180,7 @@ public function it_gets_default_repository_of_entity(): void { $repository = User::getRepository(); - $this::assertInstanceOf(Repository::class, $repository); + self::assertInstanceOf(Repository::class, $repository); } /** diff --git a/tests/src/Bridge/Spiral/Bootloader/ActiveRecordBootloaderTest.php b/tests/src/Bridge/Spiral/Bootloader/ActiveRecordBootloaderTest.php index 8b0004a..424249e 100644 --- a/tests/src/Bridge/Spiral/Bootloader/ActiveRecordBootloaderTest.php +++ b/tests/src/Bridge/Spiral/Bootloader/ActiveRecordBootloaderTest.php @@ -16,6 +16,6 @@ final class ActiveRecordBootloaderTest extends TestCase #[Test] public function it_gets_container_from_static_origin_class(): void { - $this::assertTrue($this->getContainer()->has(ORMInterface::class)); + self::assertTrue($this->getContainer()->has(ORMInterface::class)); } } diff --git a/tests/src/FacadeTest.php b/tests/src/FacadeTest.php index d835d91..1cd6941 100644 --- a/tests/src/FacadeTest.php +++ b/tests/src/FacadeTest.php @@ -48,7 +48,7 @@ public function it_gets_orm_from_facade_when_container_has_orm(): void Facade::setContainer($container); // Assert that the ORM obtained from Facade is the same as the mock - $this::assertSame($orm, Facade::getOrm()); + self::assertSame($orm, Facade::getOrm()); } /** @@ -102,7 +102,7 @@ public function it_throws_exception_when_container_does_not_have_orm_set(): void try { Facade::getOrm(); } catch (ConfigurationException $e) { - $this::assertSame($exception, $e->getPrevious()); + self::assertSame($exception, $e->getPrevious()); throw $e; } } @@ -128,7 +128,7 @@ public function it_gets_entity_manager_from_facade(): void $entityManager = Facade::getEntityManager(); - $this::assertInstanceOf(EntityManager::class, $entityManager); + self::assertInstanceOf(EntityManager::class, $entityManager); } protected function setUp(): void diff --git a/tests/src/Query/ActiveQueryTest.php b/tests/src/Query/ActiveQueryTest.php index 429c287..750af3e 100644 --- a/tests/src/Query/ActiveQueryTest.php +++ b/tests/src/Query/ActiveQueryTest.php @@ -21,7 +21,7 @@ public function it_gets_role_from_query(): void { $query = User::query(); - $this::assertSame(User::class, $query->getRole()); + self::assertSame(User::class, $query->getRole()); } /**