<?php

declare(strict_types=1);

namespace {{ tree.getFullNameSpaceOfFile(file, entity, action) }};

class {{ helper.getClassName(file, entity, action) }} extends {{ helper.getClassName(helper.findFile('AbstractItemTestBase'), entity, action) }}
{
    protected static function getPath(): string
    {
        return "{{ entity.name }}/{{ action }}";
    }

    public function test{{ action + entity.name }}()
    {
        $User = $this->createUser();

        $Item = $this->makeItem($User);
        $Item->save();
        $Idzz = [$Item->Id];
        $Response = $this->getJsonWithData($this->makeUri(), compact('Idzz'))
            ->assertStatus(401);

        $this->actingAs($User);

        $Response = $this->getJsonWithData($this->makeUri(), compact('Idzz'))
            ->assertStatus(200);
        $this->seeItemzz($Response);
        $Response->assertJsonCount(1, 'Itemzz');
        $Response->assertJsonPath('Itemzz.0.Id', $Item->Id);
    }
}
