1
0
Fork 0
mirror of synced 2024-06-01 18:39:57 +12:00

datetime tests fixes

This commit is contained in:
fogelito 2022-08-14 13:10:32 +03:00
parent 4d9c37f2db
commit 00e64e3518
4 changed files with 26 additions and 25 deletions

View file

@ -1322,6 +1322,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/dateti
'filters' => ['datetime']
]), $response, $dbForProject, $database, $audits, $events, $usage);
$response->setStatusCode(Response::STATUS_CODE_ACCEPTED);
$response->dynamic($attribute, Response::MODEL_ATTRIBUTE_DATETIME);
});

View file

@ -44,9 +44,9 @@
"appwrite/php-runtimes": "0.10.*",
"utopia-php/framework": "0.20.*",
"utopia-php/logger": "0.3.*",
"utopia-php/abuse": "dev-origin/timestamp-to-datetime as 0.7.2",
"utopia-php/abuse": "0.8.*",
"utopia-php/analytics": "0.2.*",
"utopia-php/audit": "dev-origin/unix-to-datetime as 0.8.2",
"utopia-php/audit": "0.9.*",
"utopia-php/cache": "0.6.*",
"utopia-php/cli": "0.13.*",
"utopia-php/config": "0.2.*",

40
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "993486075710ab0cdbba6c33f0b09218",
"content-hash": "55e1dfca29bbf789b3d748f5ca995495",
"packages": [
{
"name": "adhocore/jwt",
@ -1733,16 +1733,16 @@
},
{
"name": "utopia-php/abuse",
"version": "0.7.0",
"version": "0.8.0",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/abuse.git",
"reference": "52fb20e39e2e9619948bc0a73b52e10caa71350d"
"reference": "8350d498c95bdcc803b7e39575ea04fd5c7561b9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/abuse/zipball/52fb20e39e2e9619948bc0a73b52e10caa71350d",
"reference": "52fb20e39e2e9619948bc0a73b52e10caa71350d",
"url": "https://api.github.com/repos/utopia-php/abuse/zipball/8350d498c95bdcc803b7e39575ea04fd5c7561b9",
"reference": "8350d498c95bdcc803b7e39575ea04fd5c7561b9",
"shasum": ""
},
"require": {
@ -1780,9 +1780,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/abuse/issues",
"source": "https://github.com/utopia-php/abuse/tree/0.7.0"
"source": "https://github.com/utopia-php/abuse/tree/0.8.0"
},
"time": "2021-12-27T13:06:45+00:00"
"time": "2022-08-08T12:48:24+00:00"
},
{
"name": "utopia-php/analytics",
@ -1841,16 +1841,16 @@
},
{
"name": "utopia-php/audit",
"version": "0.8.0",
"version": "0.9.0",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/audit.git",
"reference": "b46dc42614a69437c45eb229249b6a6d000122c1"
"reference": "2c52de04e7ffeb2256a09d9213e87b001b7e66d2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/audit/zipball/b46dc42614a69437c45eb229249b6a6d000122c1",
"reference": "b46dc42614a69437c45eb229249b6a6d000122c1",
"url": "https://api.github.com/repos/utopia-php/audit/zipball/2c52de04e7ffeb2256a09d9213e87b001b7e66d2",
"reference": "2c52de04e7ffeb2256a09d9213e87b001b7e66d2",
"shasum": ""
},
"require": {
@ -1888,9 +1888,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/audit/issues",
"source": "https://github.com/utopia-php/audit/tree/0.8.0"
"source": "https://github.com/utopia-php/audit/tree/0.9.0"
},
"time": "2021-12-27T13:05:56+00:00"
"time": "2022-08-08T12:46:24+00:00"
},
{
"name": "utopia-php/cache",
@ -2051,16 +2051,16 @@
},
{
"name": "utopia-php/database",
"version": "0.18.9",
"version": "0.19.0",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/database.git",
"reference": "227b3ca919149b7b0d6556c8effe9ee46ed081e6"
"reference": "207d9f2665bf2124797351dfdcc928a46a301b04"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/database/zipball/227b3ca919149b7b0d6556c8effe9ee46ed081e6",
"reference": "227b3ca919149b7b0d6556c8effe9ee46ed081e6",
"url": "https://api.github.com/repos/utopia-php/database/zipball/207d9f2665bf2124797351dfdcc928a46a301b04",
"reference": "207d9f2665bf2124797351dfdcc928a46a301b04",
"shasum": ""
},
"require": {
@ -2109,9 +2109,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/database/issues",
"source": "https://github.com/utopia-php/database/tree/0.18.9"
"source": "https://github.com/utopia-php/database/tree/0.19.0"
},
"time": "2022-07-19T09:42:53+00:00"
"time": "2022-08-01T11:51:01+00:00"
},
{
"name": "utopia-php/domains",
@ -5370,5 +5370,5 @@
"platform-overrides": {
"php": "8.0"
},
"plugin-api-version": "2.3.0"
"plugin-api-version": "2.2.0"
}

View file

@ -197,7 +197,7 @@ trait DatabasesBase
$this->assertEquals($actors['body']['required'], false);
$this->assertEquals($actors['body']['array'], true);
$this->assertEquals($datetime['headers']['status-code'], 201);
$this->assertEquals($datetime['headers']['status-code'], 202);
$this->assertEquals($datetime['body']['key'], 'birthDay');
$this->assertEquals($datetime['body']['type'], 'datetime');
$this->assertEquals($datetime['body']['required'], false);
@ -410,7 +410,7 @@ trait DatabasesBase
$this->assertEquals(false, $boolean['body']['array']);
$this->assertEquals(true, $boolean['body']['default']);
$this->assertEquals(201, $datetime['headers']['status-code']);
$this->assertEquals(202, $datetime['headers']['status-code']);
$this->assertEquals('datetime', $datetime['body']['key']);
$this->assertEquals('datetime', $datetime['body']['type']);
$this->assertEquals(false, $datetime['body']['required']);
@ -834,7 +834,7 @@ trait DatabasesBase
'attributes' => ['birthDay'],
]);
$this->assertEquals(201, $releaseWithDate['headers']['status-code']);
$this->assertEquals(202, $releaseWithDate['headers']['status-code']);
$this->assertEquals('birthDay', $releaseWithDate['body']['key']);
$this->assertEquals('key', $releaseWithDate['body']['type']);
$this->assertCount(1, $releaseWithDate['body']['attributes']);