changing datetime from timestamp to datetime
This commit is contained in:
parent
08704e8c93
commit
e07e5b5cf8
|
@ -45,7 +45,7 @@
|
|||
"utopia-php/cache": "0.6.*",
|
||||
"utopia-php/cli": "0.12.*",
|
||||
"utopia-php/config": "0.2.*",
|
||||
"utopia-php/database": "0.18.*",
|
||||
"utopia-php/database": "dev-feat-attr-datetime as 0.18.7",
|
||||
"utopia-php/locale": "0.4.*",
|
||||
"utopia-php/registry": "0.5.*",
|
||||
"utopia-php/preloader": "0.2.*",
|
||||
|
|
5374
composer.lock
generated
5374
composer.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -103,7 +103,7 @@ services:
|
|||
- ./phpunit.xml:/usr/src/code/phpunit.xml
|
||||
- ./tests:/usr/src/code/tests
|
||||
- ./app:/usr/src/code/app
|
||||
# - ./vendor/utopia/database:/usr/src/code/vendor/utopia/database
|
||||
- ./vendor/utopia/database:/usr/src/code/vendor/utopia/database
|
||||
- ./docs:/usr/src/code/docs
|
||||
- ./public:/usr/src/code/public
|
||||
- ./src:/usr/src/code/src
|
||||
|
@ -208,6 +208,7 @@ services:
|
|||
- ./app:/usr/src/code/app
|
||||
- ./src:/usr/src/code/src
|
||||
# - ./vendor:/usr/src/code/vendor
|
||||
- ./vendor/utopia/database:/usr/src/code/vendor/utopia/database
|
||||
depends_on:
|
||||
- mariadb
|
||||
- redis
|
||||
|
@ -330,7 +331,7 @@ services:
|
|||
volumes:
|
||||
- ./app:/usr/src/code/app
|
||||
- ./src:/usr/src/code/src
|
||||
# - ./vendor/utopia-php/database:/usr/src/code/vendor/utopia-php/database
|
||||
- ./vendor/utopia-php/database:/usr/src/code/vendor/utopia-php/database
|
||||
depends_on:
|
||||
- redis
|
||||
- mariadb
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
convertNoticesToExceptions="true"
|
||||
convertWarningsToExceptions="true"
|
||||
processIsolation="false"
|
||||
stopOnFailure="false"
|
||||
stopOnFailure="true"
|
||||
>
|
||||
<extensions>
|
||||
<extension class="Appwrite\Tests\TestHook" />
|
||||
|
|
|
@ -47,8 +47,8 @@ class FunctionsCustomServerTest extends Scope
|
|||
$this->assertNotEmpty($response1['body']['$id']);
|
||||
$this->assertEquals('Test', $response1['body']['name']);
|
||||
$this->assertEquals('php-8.0', $response1['body']['runtime']);
|
||||
$this->assertIsInt($response1['body']['$createdAt']);
|
||||
$this->assertIsInt($response1['body']['$updatedAt']);
|
||||
$this->assertIsString($response1['body']['$createdAt']);
|
||||
$this->assertIsString($response1['body']['$updatedAt']);
|
||||
$this->assertEquals('', $response1['body']['deployment']);
|
||||
$this->assertEquals([
|
||||
'funcKey1' => 'funcValue1',
|
||||
|
@ -248,8 +248,8 @@ class FunctionsCustomServerTest extends Scope
|
|||
$this->assertEquals(200, $response1['headers']['status-code']);
|
||||
$this->assertNotEmpty($response1['body']['$id']);
|
||||
$this->assertEquals('Test1', $response1['body']['name']);
|
||||
$this->assertIsInt($response1['body']['$createdAt']);
|
||||
$this->assertIsInt($response1['body']['$updatedAt']);
|
||||
$this->assertIsString($response1['body']['$createdAt']);
|
||||
$this->assertIsString($response1['body']['$updatedAt']);
|
||||
$this->assertEquals('', $response1['body']['deployment']);
|
||||
$this->assertEquals([
|
||||
'key4' => 'value4',
|
||||
|
@ -294,7 +294,7 @@ class FunctionsCustomServerTest extends Scope
|
|||
|
||||
$this->assertEquals(201, $deployment['headers']['status-code']);
|
||||
$this->assertNotEmpty($deployment['body']['$id']);
|
||||
$this->assertIsInt($deployment['body']['$createdAt']);
|
||||
$this->assertIsString($deployment['body']['$createdAt']);
|
||||
$this->assertEquals('index.php', $deployment['body']['entrypoint']);
|
||||
|
||||
// Wait for deployment to build.
|
||||
|
@ -343,7 +343,7 @@ class FunctionsCustomServerTest extends Scope
|
|||
|
||||
$this->assertEquals(201, $largeTag['headers']['status-code']);
|
||||
$this->assertNotEmpty($largeTag['body']['$id']);
|
||||
$this->assertIsInt($largeTag['body']['$createdAt']);
|
||||
$this->assertIsString($largeTag['body']['$createdAt']);
|
||||
$this->assertEquals('index.php', $largeTag['body']['entrypoint']);
|
||||
$this->assertGreaterThan(10000, $largeTag['body']['size']);
|
||||
|
||||
|
@ -365,8 +365,8 @@ class FunctionsCustomServerTest extends Scope
|
|||
|
||||
$this->assertEquals(200, $response['headers']['status-code']);
|
||||
$this->assertNotEmpty($response['body']['$id']);
|
||||
$this->assertIsInt($response['body']['$createdAt']);
|
||||
$this->assertIsInt($response['body']['$updatedAt']);
|
||||
$this->assertIsString($response['body']['$createdAt']);
|
||||
$this->assertIsString($response['body']['$updatedAt']);
|
||||
$this->assertEquals($data['deploymentId'], $response['body']['deployment']);
|
||||
|
||||
/**
|
||||
|
@ -487,7 +487,7 @@ class FunctionsCustomServerTest extends Scope
|
|||
$this->assertEquals(201, $execution['headers']['status-code']);
|
||||
$this->assertNotEmpty($execution['body']['$id']);
|
||||
$this->assertNotEmpty($execution['body']['functionId']);
|
||||
$this->assertIsInt($execution['body']['$createdAt']);
|
||||
$this->assertIsString($execution['body']['$createdAt']);
|
||||
$this->assertEquals($data['functionId'], $execution['body']['functionId']);
|
||||
$this->assertEquals('waiting', $execution['body']['status']);
|
||||
$this->assertEquals(0, $execution['body']['statusCode']);
|
||||
|
@ -504,7 +504,7 @@ class FunctionsCustomServerTest extends Scope
|
|||
|
||||
$this->assertNotEmpty($execution['body']['$id']);
|
||||
$this->assertNotEmpty($execution['body']['functionId']);
|
||||
$this->assertIsInt($execution['body']['$createdAt']);
|
||||
$this->assertIsString($execution['body']['$createdAt']);
|
||||
$this->assertEquals($data['functionId'], $execution['body']['functionId']);
|
||||
$this->assertEquals('completed', $execution['body']['status']);
|
||||
$this->assertEquals(200, $execution['body']['statusCode']);
|
||||
|
|
|
@ -41,7 +41,7 @@ trait StorageBase
|
|||
]);
|
||||
$this->assertEquals(201, $file['headers']['status-code']);
|
||||
$this->assertNotEmpty($file['body']['$id']);
|
||||
$this->assertIsInt($file['body']['$createdAt']);
|
||||
$this->assertIsString($file['body']['$createdAt']);
|
||||
$this->assertEquals('logo.png', $file['body']['name']);
|
||||
$this->assertEquals('image/png', $file['body']['mimeType']);
|
||||
$this->assertEquals(47218, $file['body']['sizeOriginal']);
|
||||
|
@ -102,7 +102,7 @@ trait StorageBase
|
|||
|
||||
$this->assertEquals(201, $largeFile['headers']['status-code']);
|
||||
$this->assertNotEmpty($largeFile['body']['$id']);
|
||||
$this->assertIsInt($largeFile['body']['$createdAt']);
|
||||
$this->assertIsString($largeFile['body']['$createdAt']);
|
||||
$this->assertEquals('large-file.mp4', $largeFile['body']['name']);
|
||||
$this->assertEquals('video/mp4', $largeFile['body']['mimeType']);
|
||||
$this->assertEquals($totalSize, $largeFile['body']['sizeOriginal']);
|
||||
|
@ -253,7 +253,7 @@ trait StorageBase
|
|||
|
||||
$this->assertEquals(200, $file1['headers']['status-code']);
|
||||
$this->assertNotEmpty($file1['body']['$id']);
|
||||
$this->assertIsInt($file1['body']['$createdAt']);
|
||||
$this->assertIsString($file1['body']['$createdAt']);
|
||||
$this->assertEquals('logo.png', $file1['body']['name']);
|
||||
$this->assertEquals('image/png', $file1['body']['mimeType']);
|
||||
$this->assertEquals(47218, $file1['body']['sizeOriginal']);
|
||||
|
@ -547,7 +547,7 @@ trait StorageBase
|
|||
|
||||
$this->assertEquals(200, $file['headers']['status-code']);
|
||||
$this->assertNotEmpty($file['body']['$id']);
|
||||
$this->assertIsInt($file['body']['$createdAt']);
|
||||
$this->assertIsString($file['body']['$createdAt']);
|
||||
$this->assertEquals('logo.png', $file['body']['name']);
|
||||
$this->assertEquals('image/png', $file['body']['mimeType']);
|
||||
$this->assertEquals(47218, $file['body']['sizeOriginal']);
|
||||
|
|
|
@ -49,7 +49,7 @@ class StorageCustomClientTest extends Scope
|
|||
$fileId = $file['body']['$id'];
|
||||
$this->assertEquals($file['headers']['status-code'], 201);
|
||||
$this->assertNotEmpty($fileId);
|
||||
$this->assertIsInt($file['body']['$createdAt']);
|
||||
$this->assertIsString($file['body']['$createdAt']);
|
||||
$this->assertEquals('permissions.png', $file['body']['name']);
|
||||
$this->assertEquals('image/png', $file['body']['mimeType']);
|
||||
$this->assertEquals(47218, $file['body']['sizeOriginal']);
|
||||
|
@ -138,7 +138,7 @@ class StorageCustomClientTest extends Scope
|
|||
$this->assertNotEmpty($file['body']['$id']);
|
||||
$this->assertContains('user:' . $this->getUser()['$id'], $file['body']['$read']);
|
||||
$this->assertContains('user:' . $this->getUser()['$id'], $file['body']['$write']);
|
||||
$this->assertIsInt($file['body']['$createdAt']);
|
||||
$this->assertIsString($file['body']['$createdAt']);
|
||||
$this->assertEquals('permissions.png', $file['body']['name']);
|
||||
$this->assertEquals('image/png', $file['body']['mimeType']);
|
||||
$this->assertEquals(47218, $file['body']['sizeOriginal']);
|
||||
|
|
|
@ -28,7 +28,7 @@ class StorageCustomServerTest extends Scope
|
|||
]);
|
||||
$this->assertEquals(201, $bucket['headers']['status-code']);
|
||||
$this->assertNotEmpty($bucket['body']['$id']);
|
||||
$this->assertIsInt($bucket['body']['$createdAt']);
|
||||
$this->assertIsString($bucket['body']['$createdAt']);
|
||||
$this->assertIsArray($bucket['body']['$read']);
|
||||
$this->assertIsArray($bucket['body']['$write']);
|
||||
$this->assertIsArray($bucket['body']['allowedFileExtensions']);
|
||||
|
@ -187,7 +187,7 @@ class StorageCustomServerTest extends Scope
|
|||
]);
|
||||
$this->assertEquals(200, $bucket['headers']['status-code']);
|
||||
$this->assertNotEmpty($bucket['body']['$id']);
|
||||
$this->assertIsInt($bucket['body']['$createdAt']);
|
||||
$this->assertIsString($bucket['body']['$createdAt']);
|
||||
$this->assertIsArray($bucket['body']['$read']);
|
||||
$this->assertIsArray($bucket['body']['$write']);
|
||||
$this->assertIsArray($bucket['body']['allowedFileExtensions']);
|
||||
|
|
|
@ -25,7 +25,7 @@ trait TeamsBase
|
|||
$this->assertEquals('Arsenal', $response1['body']['name']);
|
||||
$this->assertGreaterThan(-1, $response1['body']['total']);
|
||||
$this->assertIsInt($response1['body']['total']);
|
||||
$this->assertIsInt($response1['body']['$createdAt']);
|
||||
$this->assertIsString($response1['body']['$createdAt']);
|
||||
|
||||
$teamUid = $response1['body']['$id'];
|
||||
$teamName = $response1['body']['name'];
|
||||
|
@ -45,7 +45,7 @@ trait TeamsBase
|
|||
$this->assertEquals('Manchester United', $response2['body']['name']);
|
||||
$this->assertGreaterThan(-1, $response2['body']['total']);
|
||||
$this->assertIsInt($response2['body']['total']);
|
||||
$this->assertIsInt($response2['body']['$createdAt']);
|
||||
$this->assertIsString($response2['body']['$createdAt']);
|
||||
|
||||
$response3 = $this->client->call(Client::METHOD_POST, '/teams', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
|
@ -60,7 +60,7 @@ trait TeamsBase
|
|||
$this->assertEquals('Newcastle', $response3['body']['name']);
|
||||
$this->assertGreaterThan(-1, $response3['body']['total']);
|
||||
$this->assertIsInt($response3['body']['total']);
|
||||
$this->assertIsInt($response3['body']['$createdAt']);
|
||||
$this->assertIsString($response3['body']['$createdAt']);
|
||||
|
||||
/**
|
||||
* Test for FAILURE
|
||||
|
@ -96,7 +96,7 @@ trait TeamsBase
|
|||
$this->assertEquals('Arsenal', $response['body']['name']);
|
||||
$this->assertGreaterThan(-1, $response['body']['total']);
|
||||
$this->assertIsInt($response['body']['total']);
|
||||
$this->assertIsInt($response['body']['$createdAt']);
|
||||
$this->assertIsString($response['body']['$createdAt']);
|
||||
|
||||
/**
|
||||
* Test for FAILURE
|
||||
|
@ -260,7 +260,7 @@ trait TeamsBase
|
|||
$this->assertEquals('Demo', $response['body']['name']);
|
||||
$this->assertGreaterThan(-1, $response['body']['total']);
|
||||
$this->assertIsInt($response['body']['total']);
|
||||
$this->assertIsInt($response['body']['$createdAt']);
|
||||
$this->assertIsString($response['body']['$createdAt']);
|
||||
|
||||
$response = $this->client->call(Client::METHOD_PUT, '/teams/' . $response['body']['$id'], array_merge([
|
||||
'content-type' => 'application/json',
|
||||
|
@ -275,7 +275,7 @@ trait TeamsBase
|
|||
$this->assertEquals('Demo New', $response['body']['name']);
|
||||
$this->assertGreaterThan(-1, $response['body']['total']);
|
||||
$this->assertIsInt($response['body']['total']);
|
||||
$this->assertIsInt($response['body']['$createdAt']);
|
||||
$this->assertIsString($response['body']['$createdAt']);
|
||||
|
||||
/**
|
||||
* Test for FAILURE
|
||||
|
@ -311,7 +311,7 @@ trait TeamsBase
|
|||
$this->assertEquals('Demo', $response['body']['name']);
|
||||
$this->assertGreaterThan(-1, $response['body']['total']);
|
||||
$this->assertIsInt($response['body']['total']);
|
||||
$this->assertIsInt($response['body']['$createdAt']);
|
||||
$this->assertIsString($response['body']['$createdAt']);
|
||||
|
||||
$response = $this->client->call(Client::METHOD_DELETE, '/teams/' . $teamUid, array_merge([
|
||||
'content-type' => 'application/json',
|
||||
|
|
|
@ -204,7 +204,7 @@ trait TeamsBaseServer
|
|||
$this->assertEquals('Arsenal', $response['body']['name']);
|
||||
$this->assertEquals(1, $response['body']['total']);
|
||||
$this->assertIsInt($response['body']['total']);
|
||||
$this->assertIsInt($response['body']['$createdAt']);
|
||||
$this->assertIsString($response['body']['$createdAt']);
|
||||
|
||||
|
||||
/** Delete User */
|
||||
|
@ -230,6 +230,6 @@ trait TeamsBaseServer
|
|||
$this->assertEquals('Arsenal', $response['body']['name']);
|
||||
$this->assertEquals(0, $response['body']['total']);
|
||||
$this->assertIsInt($response['body']['total']);
|
||||
$this->assertIsInt($response['body']['$createdAt']);
|
||||
$this->assertIsString($response['body']['$createdAt']);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -515,7 +515,7 @@ trait WebhooksBase
|
|||
$this->assertIsArray($webhook['data']['$read']);
|
||||
$this->assertIsArray($webhook['data']['$write']);
|
||||
$this->assertEquals($webhook['data']['name'], 'logo.png');
|
||||
$this->assertIsInt($webhook['data']['$createdAt']);
|
||||
$this->assertIsString($webhook['data']['$createdAt']);
|
||||
$this->assertNotEmpty($webhook['data']['signature']);
|
||||
$this->assertEquals($webhook['data']['mimeType'], 'image/png');
|
||||
$this->assertEquals($webhook['data']['sizeOriginal'], 47218);
|
||||
|
@ -571,7 +571,7 @@ trait WebhooksBase
|
|||
$this->assertIsArray($webhook['data']['$read']);
|
||||
$this->assertIsArray($webhook['data']['$write']);
|
||||
$this->assertEquals($webhook['data']['name'], 'logo.png');
|
||||
$this->assertIsInt($webhook['data']['$createdAt']);
|
||||
$this->assertIsString($webhook['data']['$createdAt']);
|
||||
$this->assertNotEmpty($webhook['data']['signature']);
|
||||
$this->assertEquals($webhook['data']['mimeType'], 'image/png');
|
||||
$this->assertEquals($webhook['data']['sizeOriginal'], 47218);
|
||||
|
@ -622,7 +622,7 @@ trait WebhooksBase
|
|||
$this->assertIsArray($webhook['data']['$read']);
|
||||
$this->assertIsArray($webhook['data']['$write']);
|
||||
$this->assertEquals($webhook['data']['name'], 'logo.png');
|
||||
$this->assertIsInt($webhook['data']['$createdAt']);
|
||||
$this->assertIsString($webhook['data']['$createdAt']);
|
||||
$this->assertNotEmpty($webhook['data']['signature']);
|
||||
$this->assertEquals($webhook['data']['mimeType'], 'image/png');
|
||||
$this->assertEquals($webhook['data']['sizeOriginal'], 47218);
|
||||
|
@ -705,7 +705,7 @@ trait WebhooksBase
|
|||
$this->assertEquals('Arsenal', $webhook['data']['name']);
|
||||
$this->assertGreaterThan(-1, $webhook['data']['total']);
|
||||
$this->assertIsInt($webhook['data']['total']);
|
||||
$this->assertIsInt($webhook['data']['$createdAt']);
|
||||
$this->assertIsString($webhook['data']['$createdAt']);
|
||||
|
||||
/**
|
||||
* Test for FAILURE
|
||||
|
@ -750,7 +750,7 @@ trait WebhooksBase
|
|||
$this->assertEquals('Demo New', $webhook['data']['name']);
|
||||
$this->assertGreaterThan(-1, $webhook['data']['total']);
|
||||
$this->assertIsInt($webhook['data']['total']);
|
||||
$this->assertIsInt($webhook['data']['$createdAt']);
|
||||
$this->assertIsString($webhook['data']['$createdAt']);
|
||||
|
||||
/**
|
||||
* Test for FAILURE
|
||||
|
@ -799,7 +799,7 @@ trait WebhooksBase
|
|||
$this->assertEquals('Chelsea', $webhook['data']['name']);
|
||||
$this->assertGreaterThan(-1, $webhook['data']['total']);
|
||||
$this->assertIsInt($webhook['data']['total']);
|
||||
$this->assertIsInt($webhook['data']['$createdAt']);
|
||||
$this->assertIsString($webhook['data']['$createdAt']);
|
||||
|
||||
/**
|
||||
* Test for FAILURE
|
||||
|
|
Loading…
Reference in a new issue