Skip to content
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

Asserting a chain with instances when testing throws error #36008

Closed
gerardnll opened this issue Jan 22, 2021 · 0 comments · Fixed by #36031
Closed

Asserting a chain with instances when testing throws error #36008

gerardnll opened this issue Jan 22, 2021 · 0 comments · Fixed by #36031
Assignees
Labels

Comments

@gerardnll
Copy link
Contributor

  • Laravel Version: 8.23.1
  • PHP Version: 8.0.1
  • Database Driver & Version:

Description:

Although documentation specifies that passing an instance is allowed when testing, asserting a chain with object instances throws an error. Seems like it only expects strings.

TypeError: Illegal offset type in isset or empty

/app/vendor/laravel/framework/src/Illuminate/Support/Testing/Fakes/BusFake.php:382
/app/vendor/laravel/framework/src/Illuminate/Support/Testing/Fakes/BusFake.php:322
/app/vendor/laravel/framework/src/Illuminate/Support/Testing/Fakes/BusFake.php:206
/app/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:261

Steps To Reproduce:

Create a test and assert a chain. You don't even need to add various jobs to test it.

Bus::assertChained([
    new JobOne($order)
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants