Alcaeus\MongoDbAdapter\Tests\Mongo\MongoCollectionTest::testValidate PHP Method

testValidate() public method

public testValidate ( )
    public function testValidate()
    {
        $collection = $this->getCollection();
        $document = ['foo' => 'bar'];
        $collection->insert($document);
        $result = $collection->validate();
        $this->assertArraySubset(['ns' => 'mongo-php-adapter.test', 'nrecords' => 1, 'nIndexes' => 1, 'keysPerIndex' => ['mongo-php-adapter.test.$_id_' => 1], 'valid' => true, 'errors' => [], 'warning' => 'Some checks omitted for speed. use {full:true} option to do more thorough scan.', 'ok' => 1.0], $result);
    }
MongoCollectionTest