added methods to MongoDriver for custom commands, findAndModify, count

This commit is contained in:
Anton Grebnev
2011-11-22 16:29:00 +04:00
parent 54b991314d
commit a87845980d
7 changed files with 156 additions and 7 deletions

View File

@ -101,6 +101,18 @@ class MongoModelTest extends PHPUnit_Framework_TestCase
/**
* @runInSeparateProcess
*/
public function testCount()
{
if (!defined('DEBUG')) {
define('DEBUG', false);
}
$this->assertEquals(5, $this->model->count());
$this->assertEquals(2, $this->model->count(array('name' => 'eggs')));
}
/**
* @runInSeparateProcess
*/
public function testFetch()
{
if (!defined('DEBUG')) {