Fixed tests
This commit is contained in:
parent
a3aeecfd0d
commit
bd073da05e
1 changed files with 0 additions and 35 deletions
|
@ -317,41 +317,6 @@ trait DatabaseBase
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @depends testCreateDocument
|
|
||||||
*/
|
|
||||||
public function testListDocumentsFirstAndLast(array $data):array
|
|
||||||
{
|
|
||||||
$documents = $this->client->call(Client::METHOD_GET, '/database/collections/' . $data['moviesId'] . '/documents', array_merge([
|
|
||||||
'content-type' => 'application/json',
|
|
||||||
'x-appwrite-project' => $this->getProject()['$id'],
|
|
||||||
], $this->getHeaders()), [
|
|
||||||
'limit' => 1,
|
|
||||||
'orderField' => 'releaseYear',
|
|
||||||
'orderType' => 'ASC',
|
|
||||||
'orderCast' => 'int',
|
|
||||||
'first' => true,
|
|
||||||
]);
|
|
||||||
|
|
||||||
$this->assertEquals(1944, $documents['body']['releaseYear']);
|
|
||||||
|
|
||||||
$documents = $this->client->call(Client::METHOD_GET, '/database/collections/' . $data['moviesId'] . '/documents', array_merge([
|
|
||||||
'content-type' => 'application/json',
|
|
||||||
'x-appwrite-project' => $this->getProject()['$id'],
|
|
||||||
], $this->getHeaders()), [
|
|
||||||
'limit' => 2,
|
|
||||||
'offset' => 1,
|
|
||||||
'orderField' => 'releaseYear',
|
|
||||||
'orderType' => 'ASC',
|
|
||||||
'orderCast' => 'int',
|
|
||||||
'last' => true,
|
|
||||||
]);
|
|
||||||
|
|
||||||
$this->assertEquals(2019, $documents['body']['releaseYear']);
|
|
||||||
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @depends testCreateDocument
|
* @depends testCreateDocument
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue