jikan-rest/tests/HttpV4/Controllers/MagazineControllerTest.php

28 lines
704 B
PHP
Raw Normal View History

<?php /** @noinspection PhpIllegalPsrClassPathInspection */
namespace Tests\HttpV4\Controllers;
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();
$test = $this->get('/v4/magazines');
$test->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
}
}