Skip to content

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

Description

@stephenjude

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(
     51get_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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions