public function testConnection() { $config1 = $this->config['DBconfig']; $Db1 = new DbModel($config1); $this->assertEquals(true, $Db1->CheckConnection()); $config2 = $this->config['DBconfig']; $config2['username'] = "******"; @($Db2 = new DbModel($config2)); $this->assertEquals(false, $Db2->CheckConnection()); }