Fix tests
This commit is contained in:
parent
f37434af17
commit
0fce4a49db
@ -3,8 +3,8 @@
|
||||
/**
|
||||
* PHP version 7.3
|
||||
*
|
||||
* @category TaskHistory
|
||||
* @package RetailCrm\Api\Model\Entity\TaskComment
|
||||
* @category TaskComment
|
||||
* @package RetailCrm\Api\Model\Entity\T
|
||||
*/
|
||||
|
||||
namespace RetailCrm\Api\Model\Entity\Tasks;
|
||||
|
@ -283,7 +283,7 @@ class Tasks extends AbstractApiResourceGroup
|
||||
* $request->limit = 100;
|
||||
* $request->page = 1;
|
||||
* $request->filter = new TaskHistoryFilter();
|
||||
* $request->filter->sinceId = 1111;
|
||||
* $request->filter->sinceId = 1;
|
||||
*
|
||||
* try {
|
||||
* $response = $client->tasks->history($request);
|
||||
@ -326,6 +326,7 @@ class Tasks extends AbstractApiResourceGroup
|
||||
$request,
|
||||
TasksHistoryResponse::class
|
||||
);
|
||||
|
||||
return $response;
|
||||
}
|
||||
}
|
||||
|
@ -185,24 +185,24 @@ EOF;
|
||||
"success":true,
|
||||
"history":[
|
||||
{
|
||||
"id":1,
|
||||
"createdAt":"2023-03-22 19:00:29",
|
||||
"created":true,
|
||||
"source":"rule",
|
||||
"field":"id",
|
||||
"oldValue":null,
|
||||
"newValue":1,
|
||||
"task":{
|
||||
"id":95978,
|
||||
"text":"",
|
||||
"commentary":"",
|
||||
"createdAt":"2023-03-22 19:00:29",
|
||||
"complete":false,
|
||||
"performer":116,
|
||||
"performerType":"user",
|
||||
"id": 1,
|
||||
"createdAt": "2023-03-22 19:00:29",
|
||||
"created": true,
|
||||
"source": "rule",
|
||||
"field": "id",
|
||||
"oldValue": null,
|
||||
"newValue": 1,
|
||||
"task": {
|
||||
"id": 1,
|
||||
"text": "",
|
||||
"commentary": "",
|
||||
"createdAt": "2023-03-22 19:00:29",
|
||||
"complete": false,
|
||||
"performer": 2,
|
||||
"performerType": "user",
|
||||
"customer":{
|
||||
"type":"customer",
|
||||
"id":1
|
||||
"type": "customer",
|
||||
"id": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -210,9 +210,9 @@ EOF;
|
||||
}
|
||||
EOF;
|
||||
|
||||
$mock = static::createApiMockBuilder('tasks/1');
|
||||
$mock = static::createApiMockBuilder('tasks/history');
|
||||
$mock->matchMethod(RequestMethod::GET)
|
||||
->reply(200)
|
||||
->reply()
|
||||
->withBody($json);
|
||||
|
||||
$client = TestClientFactory::createClient($mock->getClient());
|
||||
@ -225,6 +225,6 @@ EOF;
|
||||
|
||||
$response = $client->tasks->history($request);
|
||||
|
||||
self::assertModelEqualsToResponse($json, $response);
|
||||
self::assertModelEqualsToResponse($json, $response, true);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user