Esempio n. 1
0
 public function testGetMongoDb()
 {
     $this->assertInternalType(PHPUnit_Framework_Constraint_IsType::TYPE_OBJECT, My_ShantyMongo_User::getMongoDb());
     $this->assertEquals(TESTS_SHANTY_MONGO_DB, My_ShantyMongo_User::getMongoDb()->__toString());
 }
Esempio n. 2
0
 public function testGetMongoDb()
 {
     $this->assertType(PHPUnit_Framework_Constraint_IsType::TYPE_OBJECT, My_ShantyMongo_User::getMongoDb());
     $this->assertEquals(TESTS_SHANTY_MONGO_DB, My_ShantyMongo_User::getMongoDb()->__toString());
     $connection = new Shanty_Mongo_Connection('localhost');
     Shanty_Mongo::addSlave($connection);
     $this->assertType(PHPUnit_Framework_Constraint_IsType::TYPE_OBJECT, My_ShantyMongo_User::getMongoDb(false));
     $this->assertEquals(TESTS_SHANTY_MONGO_DB, My_ShantyMongo_User::getMongoDb(false)->__toString());
 }