public function assertGetDatabaseNameWorks() { // An alias specified without the hash should have alias *and* database name equal to each other. $this->assertIdentical(CoughDatabaseFactory::getDatabaseName('testConfigAlias'), 'testConfigAlias'); // Specifying an alias with a hash allows access to the value stored therein. $this->assertIdentical(CoughDatabaseFactory::getDatabaseName('reporting_server'), 'reports'); // Trying to access a database name that doesn't have a mapping should return the original value. $this->assertIdentical(CoughDatabaseFactory::getDatabaseName('reports'), 'reports'); // Specifying the db_name_hash allows a more direct way of configuring the aliases and database name mappings $this->assertIdentical(CoughDatabaseFactory::getDatabaseName('db_alias'), 'actual_db_name'); $this->assertIdentical(CoughDatabaseFactory::getDatabaseName('write_server'), 'reports'); }
public static function getDbName() { return CoughDatabaseFactory::getDatabaseName(Miss::$dbName); }
public static function getDbName() { return CoughDatabaseFactory::getDatabaseName(Book2library::$dbName); }
public static function getDbName() { return CoughDatabaseFactory::getDatabaseName(ProductOrder::$dbName); }