enlighten icon indicating copy to clipboard operation
enlighten copied to clipboard

Enlighten Keeps Returning Call to undefined method getName() On PHPUnit 10

Open stephenjude opened this issue 2 years ago • 0 comments

When running PHPUnit 10, Enlighten keeps returning: Call to undefined method Tests\Api\Sponsor\GrantTest::getName()

To Reproduce Steps to reproduce the behavior:

  1. Create a Laravel 10 application (it comes with PHPUnit 10).
  2. Setup Enlighten as specified on the Readme.md
  3. Run php artisan enlighten
  4. 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.

stephenjude avatar Aug 30 '23 09:08 stephenjude