Skip to content
Permalink
Browse files

Finish fixing connection aliasing.

The code in #8414 removed the defaultConnectionName from a test model.
This shouldn't have been removed as it was exposing an issue in #8414.

Refs #8414
  • Loading branch information...
markstory committed Mar 6, 2016
1 parent 1151547 commit 9514316541f2d59183924d6969dc3fcf678969ec
@@ -139,7 +139,7 @@ protected function _aliasConnections()
}
}
foreach ($map as $alias => $connection) {
ConnectionManager::alias($connection, $alias);
ConnectionManager::alias($alias, $connection);
}
}
@@ -93,6 +93,7 @@ public function testCustomTranslationTable()
$this->assertEquals('\TestApp\Model\Table\I18nTable', $i18n->name());
$this->assertInstanceOf('TestApp\Model\Table\I18nTable', $i18n->target());
$this->assertEquals('test_custom_i18n_datasource', $i18n->target()->connection()->configName());
$this->assertEquals('custom_i18n_table', $i18n->target()->table());
}
@@ -24,4 +24,9 @@ public function initialize(array $config)
{
$this->table('custom_i18n_table');
}
public static function defaultConnectionName()
{
return 'custom_i18n_datasource';
}
}

0 comments on commit 9514316

Please sign in to comment.
You can’t perform that action at this time.