diff --git a/tests/TestCase.php b/tests/TestCase.php index 9388afda..9035e0f3 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -5,7 +5,6 @@ declare(strict_types=1); namespace Stancl\Tenancy\Tests; use Illuminate\Support\Facades\Redis; -use Illuminate\Testing\Assert as PHPUnit; use Stancl\Tenancy\Tests\Etc\Tenant; abstract class TestCase extends \Orchestra\Testbench\TestCase @@ -32,9 +31,8 @@ abstract class TestCase extends \Orchestra\Testbench\TestCase // Laravel 6.x support $testResponse = class_exists('Illuminate\Testing\TestResponse') ? 'Illuminate\Testing\TestResponse' : 'Illuminate\Foundation\Testing\TestResponse'; $testResponse::macro('assertContent', function ($content) { - /** @var TestResponse $this */ - - PHPUnit::assertSame($content, $this->baseResponse->getContent()); + $assertClass = class_exists('Illuminate\Testing\Assert') ? 'Illuminate\Testing\Assert' : 'Illuminate\Foundation\Testing\Assert'; + $assertClass::assertSame($content, $this->baseResponse->getContent()); return $this; });