public function testcheckDatabaseVersion() { error_reporting(E_ERROR | E_PARSE); $SugarApplication = new SugarApplication(); //execute the method with false parameter and check for false returned as it cannot connect to DB. //testing with true will allow it to use die() which stops phpunit execution as well. $result = $SugarApplication->checkDatabaseVersion(false); $this->assertFalse($result); }