-
-
Notifications
You must be signed in to change notification settings - Fork 432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use PHPUnit 10 for testing #2409
Conversation
The remaining issue is this:
Essentially, the problem lies within the use of |
This is a possible (dirty) workaround https://laravel.com/docs/10.x/container#binding-primitives $this->app->when(TestCase::class)
->needs('$name')
->give("TestName"); |
Thanks @pyrou, unfortunately I could not get it to work. Could you check out the branch and see if you can make it work? |
Looks like because its called to early. Somehow it is reset somewhere When moving code in TestCase::setUp() it works fine // tests/TestCase.php
protected function setUp(): void
{
parent::setUp();
// This default is only valid for testing Lighthouse itself and thus
// is not defined in the reusable test trait.
$this->schema ??= self::PLACEHOLDER_QUERY;
$this->setUpTestSchema();
$this->app->when($this::class)
->needs('$name')
->give('TestName');
} |
Using |
No description provided.