jikan-rest/tests/Integration/MagazineControllerTest.php

28 lines
683 B
PHP
Raw Permalink Normal View History

<?php /** @noinspection PhpIllegalPsrClassPathInspection */
2023-02-12 15:14:11 +00:00
namespace Tests\Integration;
use App\Magazine;
use App\Testing\ScoutFlush;
use App\Testing\SyntheticMongoDbTransaction;
use Tests\TestCase;
2019-05-13 09:00:01 +05:00
class MagazineControllerTest extends TestCase
{
use SyntheticMongoDbTransaction;
use ScoutFlush;
2021-01-14 06:41:13 +05:00
public function testMagazinesListing()
2019-05-13 09:00:01 +05:00
{
Magazine::factory(1)->create();
$this->get('/v4/magazines')
->seeStatusCode(200)
->seeJsonStructure(['data' => [
2021-01-14 06:41:13 +05:00
[
2019-05-13 09:00:01 +05:00
'mal_id',
'name',
2021-01-14 06:41:13 +05:00
'url',
'count'
2019-05-13 09:00:01 +05:00
]
2021-01-14 06:41:13 +05:00
]]);
2019-05-13 09:00:01 +05:00
}
}