Skip to content

Commit

Permalink
Add test for TableRegistry::config with plugin syntax aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
Berry Goudswaard committed Nov 20, 2014
1 parent 8fc94e2 commit dc0db6a
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/TestCase/ORM/TableRegistryTest.php
Expand Up @@ -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.
*
Expand Down

0 comments on commit dc0db6a

Please sign in to comment.