This custom connection was not defined and was causing missing connection errors now that aliasing is correct. Instead of checking the connection name this test can do its work by checking the object instance type.
@@ -92,8 +92,8 @@ class TranslateBehaviorTest extends TestCase
$i18n = $items->getByProperty('_i18n');
$this->assertEquals('\TestApp\Model\Table\I18nTable', $i18n->name());
+ $this->assertInstanceOf('TestApp\Model\Table\I18nTable', $i18n->target());
$this->assertEquals('custom_i18n_table', $i18n->target()->table());
- $this->assertEquals('test_custom_i18n_datasource', $i18n->target()->connection()->configName());
}
/**
@@ -24,9 +24,4 @@ class I18nTable extends Table
{
$this->table('custom_i18n_table');
-
- public static function defaultConnectionName()
- {
- return 'custom_i18n_datasource';
- }