-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathRecurringTemplateTest.php
More file actions
41 lines (30 loc) · 1.13 KB
/
RecurringTemplateTest.php
File metadata and controls
41 lines (30 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
declare(strict_types=1);
namespace Sysix\LexOffice\Tests\Clients;
use Psr\Http\Message\ResponseInterface;
use Sysix\LexOffice\Clients\RecurringTemplate;
use Sysix\LexOffice\Tests\TestClient;
final class RecurringTemplateTest extends TestClient
{
public function testGet(): void
{
[$api, $stub] = $this->createClientMockObject(RecurringTemplate::class);
$response = $stub->get('resource-id');
$this->assertInstanceOf(ResponseInterface::class, $response);
$this->assertEquals('GET', $api->getRequest()->getMethod());
$this->assertEquals(
$api->apiUrl . '/v1/recurring-templates/resource-id',
$api->getRequest()->getUri()->__toString()
);
}
public function testGetPage(): void
{
[$api, $stub] = $this->createClientMockObject(RecurringTemplate::class);
$stub->getPage(0);
$this->assertEquals('GET', $api->getRequest()->getMethod());
$this->assertEquals(
$api->apiUrl . '/v1/recurring-templates?page=0&size=100&sort=updatedDate%2CDESC',
$api->getRequest()->getUri()->__toString()
);
}
}