-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add endpoint for getting item properties (RAD-720)
- Loading branch information
Showing
7 changed files
with
47 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Lmc\Matej\RequestBuilder; | ||
|
||
use Fig\Http\Message\RequestMethodInterface; | ||
use Lmc\Matej\Model\Request; | ||
|
||
class ItemPropertiesGetRequestBuilder extends AbstractRequestBuilder | ||
{ | ||
protected const ENDPOINT_PATH = '/item-properties'; | ||
|
||
public function build(): Request | ||
{ | ||
return new Request(self::ENDPOINT_PATH, RequestMethodInterface::METHOD_GET); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
tests/integration/RequestBuilder/ItemPropertiesGetRequestBuilderTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Lmc\Matej\IntegrationTests\RequestBuilder; | ||
|
||
use Lmc\Matej\IntegrationTests\IntegrationTestCase; | ||
|
||
/** | ||
* @covers \Lmc\Matej\RequestBuilder\ItemPropertiesGetRequestBuilder | ||
*/ | ||
class ItemPropertiesGetRequestBuilderTest extends IntegrationTestCase | ||
{ | ||
/** @test */ | ||
public function shouldGetListOfPropertiesFromMatej(): void | ||
{ | ||
$response = $this->createMatejInstance() | ||
->request() | ||
->getItemProperties() | ||
->send(); | ||
|
||
$this->assertResponseCommandStatuses($response, 'OK'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters