mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 23:14:03 +00:00
Testing 6.x support even for Assert
This commit is contained in:
parent
e1a3b1f7c9
commit
c75c5b3879
1 changed files with 2 additions and 4 deletions
|
|
@ -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;
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue