Browse Source

Remove use of undefined connection name.

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.
Mark Story 10 years ago
parent
commit
ce150f303f

+ 1 - 1
tests/TestCase/ORM/Behavior/TranslateBehaviorTest.php

@@ -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());
     }
 
     /**

+ 0 - 5
tests/test_app/TestApp/Model/Table/I18nTable.php

@@ -24,9 +24,4 @@ class I18nTable extends Table
     {
         $this->table('custom_i18n_table');
     }
-
-    public static function defaultConnectionName()
-    {
-        return 'custom_i18n_datasource';
-    }
 }