Skip to content

Commit

Permalink
change test class to simulate core's config usage
Browse files Browse the repository at this point in the history
it doesn't have to - but it's probably a good idea not to leave
"settings" suggestions in the core
  • Loading branch information
AD7six committed Mar 29, 2014
1 parent e49d52f commit 75b0f45
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/TestCase/Datasource/ConnectionManagerTest.php
Expand Up @@ -167,7 +167,7 @@ public function testGetPluginDataSource() {

$this->assertInstanceOf('TestPlugin\Datasource\TestSource', $connection);
unset($config['className']);
$this->assertSame($config + ['name' => 'test_variant'], $connection->settings);
$this->assertSame($config + ['name' => 'test_variant'], $connection->config());
}

/**
Expand Down
23 changes: 23 additions & 0 deletions tests/test_app/Plugin/TestPlugin/Datasource/TestSource.php
Expand Up @@ -4,4 +4,27 @@

class TestSource {

/**
* Config
*
* @var array
*/
protected $_config;

/**
* Constructor
*/
public function __construct(array $config) {
$this->_config = $config;
}

/**
* config
*
* @return array
*/
public function config() {
return $this->_config;
}

}

0 comments on commit 75b0f45

Please sign in to comment.