diff --git a/tests/API/Endpoints/PartCustomStateEndpointTest.php b/tests/API/Endpoints/PartCustomStateEndpointTest.php new file mode 100644 index 00000000..ac353d9c --- /dev/null +++ b/tests/API/Endpoints/PartCustomStateEndpointTest.php @@ -0,0 +1,69 @@ +. + */ + +declare(strict_types=1); + + +namespace App\Tests\API\Endpoints; + +class PartCustomStateEndpointTest extends CrudEndpointTestCase +{ + + protected function getBasePath(): string + { + return '/api/part_custom_states'; + } + + public function testGetCollection(): void + { + $this->_testGetCollection(); + self::assertJsonContains([ + 'hydra:totalItems' => 7, + ]); + } + + public function testGetItem(): void + { + $this->_testGetItem(1); + $this->_testGetItem(2); + $this->_testGetItem(3); + } + + public function testCreateItem(): void + { + $this->_testPostItem([ + 'name' => 'Test API', + 'parent' => '/api/part_custom_states/1', + ]); + } + + public function testUpdateItem(): void + { + $this->_testPatchItem(5, [ + 'name' => 'Updated', + 'parent' => '/api/part_custom_states/2', + ]); + } + + public function testDeleteItem(): void + { + $this->_testDeleteItem(4); + } +}