mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
some tests
This commit is contained in:
1 parent
d133fab2ba
commit
fa208bf31c
2 files changed
+8
-4
No files matched your search
+5
-2
@@ -95,7 +95,6 @@ class MongoClient
|
||||
|
||||
$sections = BSON\fromPHP($params);
|
||||
$message = pack('V*', 21 + strlen($sections), $this->id, 0, 2013, 0) . "\0" . $sections;
|
||||
|
||||
return $this->send($message);
|
||||
}
|
||||
|
||||
@@ -119,11 +118,15 @@ class MongoClient
|
||||
* Send a message to connection.
|
||||
*
|
||||
* @param mixed $data
|
||||
* @return stdClass|array|int
|
||||
* @throws DuplicateException
|
||||
*/
|
||||
public function send(mixed $data): stdClass|array|int
|
||||
{
|
||||
$this->client->send($data);
|
||||
return $this->receive();
|
||||
$res = $this->receive();
|
||||
//var_dump($res);
|
||||
return $res;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+3
-2
@@ -54,10 +54,11 @@ class MongoTest extends TestCase
|
||||
'language' => 'English'
|
||||
]
|
||||
);
|
||||
self::assertEquals(24, strlen((string)$doc['_id']));
|
||||
|
||||
var_dump($doc['_id']);
|
||||
|
||||
$this->getDatabase()->insert('movies', ['9 Monkeys']);
|
||||
$doc = $this->getDatabase()->insert('movies', ['9 Monkeys']);
|
||||
self::assertEquals(24, strlen((string)$doc['_id']));
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user