diff --git a/tests/TestCase/ORM/TableRegistryTest.php b/tests/TestCase/ORM/TableRegistryTest.php index a01d1e66b8f..9242429e2f3 100644 --- a/tests/TestCase/ORM/TableRegistryTest.php +++ b/tests/TestCase/ORM/TableRegistryTest.php @@ -81,6 +81,28 @@ public function testConfig() { $this->assertEquals($expected, $result); } +/** + * Test config() method with plugin syntax aliases + * + * @return void + */ + public function testConfigPlugin() { + Plugin::load('TestPlugin'); + + $data = [ + 'connection' => 'testing', + 'entityClass' => 'TestPlugin\Model\Entity\Comment', + ]; + + + $result = TableRegistry::config('TestPlugin.TestPluginComments', $data); + $this->assertEquals($data, $result, 'Returns config data.'); + + $result = TableRegistry::config(); + $expected = ['TestPluginComments' => $data]; + $this->assertEquals($expected, $result); + } + /** * Test calling config() on existing instances throws an error. *