public function testWhereElemMatch()
{
// create new document
$document = $this->collection->createDocument(array('param' => array(array('subparam1' => 10, 'subparam2' => 20), array('subparam1' => 200, 'subparam2' => 300))));
$document->save();
$documentId = $document->getId();
// find
$q = $this->collection->find();
$search = $q->whereElemMatch('param', $q->expression()->whereGreater('subparam1', 0)->whereLess('subparam2', 30)->whereGreater('subparam2', 10));
$document = $search->findOne();
$this->assertNotEmpty($document);
$this->assertEquals($documentId, $document->getId());
}