From b4130f254e3621e164b5525fb679c99868aa748e Mon Sep 17 00:00:00 2001 From: Marcel Diegelmann Date: Tue, 14 Oct 2025 16:52:35 +0200 Subject: [PATCH] =?UTF-8?q?PartCustomStateEndpoint=20hinzuf=C3=BCgen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Endpoints/PartCustomStateEndpointTest.php | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 tests/API/Endpoints/PartCustomStateEndpointTest.php 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); + } +}