This commit is contained in:
Marcel Pociot
2020-04-30 15:17:25 +02:00
parent 0dfda0825c
commit a972c8581c
24 changed files with 444 additions and 29 deletions

View File

@@ -2,6 +2,10 @@
namespace Tests\Feature;
use Clue\React\SQLite\DatabaseInterface;
use GuzzleHttp\Psr7\Response;
use Illuminate\Support\Str;
use Psr\Http\Message\ResponseInterface;
use React\EventLoop\Factory;
use React\EventLoop\LoopInterface;
use React\EventLoop\StreamSelectLoop;
@@ -33,4 +37,13 @@ abstract class TestCase extends \Tests\TestCase
{
return await($promise, $loop ?? $this->loop, $timeout ?? static::AWAIT_TIMEOUT);
}
protected function assertDatabaseHasResults($query)
{
$database = app(DatabaseInterface::class);
$result = $this->await($database->query($query));
$this->assertGreaterThanOrEqual(1, count($result->rows));
}
}