1
0
mirror of synced 2024-11-22 05:16:07 +03:00

Fix tests

This commit is contained in:
Uryvskiy Dima 2024-01-16 23:47:15 +03:00
parent f37434af17
commit 0fce4a49db
3 changed files with 24 additions and 23 deletions

View File

@ -3,8 +3,8 @@
/** /**
* PHP version 7.3 * PHP version 7.3
* *
* @category TaskHistory * @category TaskComment
* @package RetailCrm\Api\Model\Entity\TaskComment * @package RetailCrm\Api\Model\Entity\T
*/ */
namespace RetailCrm\Api\Model\Entity\Tasks; namespace RetailCrm\Api\Model\Entity\Tasks;

View File

@ -283,7 +283,7 @@ class Tasks extends AbstractApiResourceGroup
* $request->limit = 100; * $request->limit = 100;
* $request->page = 1; * $request->page = 1;
* $request->filter = new TaskHistoryFilter(); * $request->filter = new TaskHistoryFilter();
* $request->filter->sinceId = 1111; * $request->filter->sinceId = 1;
* *
* try { * try {
* $response = $client->tasks->history($request); * $response = $client->tasks->history($request);
@ -326,6 +326,7 @@ class Tasks extends AbstractApiResourceGroup
$request, $request,
TasksHistoryResponse::class TasksHistoryResponse::class
); );
return $response; return $response;
} }
} }

View File

@ -193,12 +193,12 @@ EOF;
"oldValue": null, "oldValue": null,
"newValue": 1, "newValue": 1,
"task": { "task": {
"id":95978, "id": 1,
"text": "", "text": "",
"commentary": "", "commentary": "",
"createdAt": "2023-03-22 19:00:29", "createdAt": "2023-03-22 19:00:29",
"complete": false, "complete": false,
"performer":116, "performer": 2,
"performerType": "user", "performerType": "user",
"customer":{ "customer":{
"type": "customer", "type": "customer",
@ -210,9 +210,9 @@ EOF;
} }
EOF; EOF;
$mock = static::createApiMockBuilder('tasks/1'); $mock = static::createApiMockBuilder('tasks/history');
$mock->matchMethod(RequestMethod::GET) $mock->matchMethod(RequestMethod::GET)
->reply(200) ->reply()
->withBody($json); ->withBody($json);
$client = TestClientFactory::createClient($mock->getClient()); $client = TestClientFactory::createClient($mock->getClient());
@ -225,6 +225,6 @@ EOF;
$response = $client->tasks->history($request); $response = $client->tasks->history($request);
self::assertModelEqualsToResponse($json, $response); self::assertModelEqualsToResponse($json, $response, true);
} }
} }