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

Use Illuminate\Foundation\Testing\TestCase instead of Orchestra\Testbench\TestCase #3

Merged
merged 1 commit into from
Feb 17, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion tests/Integration/Queue/CustomPayloadTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@

use Illuminate\Contracts\Bus\QueueingDispatcher;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Testing\TestCase;
use Illuminate\Queue\Queue;
use Illuminate\Support\ServiceProvider;
use Orchestra\Testbench\TestCase;
use Orchestra\Testbench\Concerns\CreatesApplication;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be testing Illuminate\Foundation\Testing\TestCase and not Orchestra\Testbench\TestCase.

I would recommend adding similar tests on orchestra/testbench-core to cover this issue.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getPackageProviders won't work after this change, right? I'll adjust it to manually register it

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@deleugpn getPackageProviders exists in Orchestra\Testbench\Concerns\CreatesApplication.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For simple tests such as this, we don't need Orchestra\Testbench\Concern\Testing where all the setUp, tearDown, and all other feature customs to Testbench exists.


class CustomPayloadTest extends TestCase
{
use CreatesApplication;

protected function getPackageProviders($app)
{
return [QueueServiceProvider::class];
Expand Down