enlighten
enlighten copied to clipboard
Enlighten Keeps Returning Call to undefined method getName() On PHPUnit 10
When running PHPUnit 10, Enlighten keeps returning:
Call to undefined method Tests\Api\Sponsor\GrantTest::getName()
To Reproduce Steps to reproduce the behavior:
- Create a Laravel 10 application (it comes with PHPUnit 10).
- Setup Enlighten as specified on the Readme.md
- Run
php artisan enlighten - See error:
FAILED Tests\Api\Sponsor\GrantTest > sponsor can create a grant Error
Call to undefined method Tests\Api\Sponsor\GrantTest::getName()
at vendor/styde/enlighten/src/Tests/EnlightenSetup.php:52
48▕ private function makeExample(): void
49▕ {
50▕ $this->app->make(ExampleCreator::class)->makeExample(
51▕ get_class($this),
➜ 52▕ $this->getName(false),
53▕ $this->getProvidedData(),
54▕ $this->dataName()
55▕ );
56▕ }
+3 vendor frames
4 tests/TestCase.php:19
Expected behavior If you follow the above steps on PHPUnit 9.6, it runs without errors.