createCollection() public method

Create collection
public createCollection ( string $name, array $options = null ) : Collection
$name string name of collection
$options array array of options
return Collection
Example #1
0
 /**
  * @expectedException Sokil\Mongo\Exception
  * @expectedExceptionMessage Class \WrongClass not found while map collection name to class
  */
 public function testCreateCollection()
 {
     $this->database->map('collection', '\\WrongClass');
     $this->database->createCollection('collection');
 }