Beispiel #1
0
 public function testMongoConnectsAfterInitialisedAndNotConnectedByDefault()
 {
     $config = $this->initConfig(array('connect' => false));
     $this->assertFalse(@Config::getInstance()->mongo->connected);
     $collection = new FooBar();
     $this->assertEquals('foo_bar', $collection->getSource());
     $collection->save();
     $collection->delete();
     $this->assertTrue(@Config::getInstance()->mongo->connected);
 }
Beispiel #2
0
 public function testConfigStoresNotConnectedMongoClientWhenOptionsArePassed()
 {
     $config = $this->initConfig(array('connect' => false));
     $this->assertFalse(@Config::getInstance()->mongo->connected);
 }