diff --git a/tests/TestCase/Database/Driver/MysqlTest.php b/tests/TestCase/Database/Driver/MysqlTest.php index a9f8933a7fe..7bb2f09e1ec 100644 --- a/tests/TestCase/Database/Driver/MysqlTest.php +++ b/tests/TestCase/Database/Driver/MysqlTest.php @@ -32,7 +32,7 @@ class MysqlTest extends TestCase public function setup() { parent::setUp(); - $config = ConnectionManager::config('test'); + $config = ConnectionManager::getConfig('test'); $this->skipIf(strpos($config['driver'], 'Mysql') === false, 'Not using Mysql for test config'); } diff --git a/tests/TestCase/Database/Schema/MysqlSchemaTest.php b/tests/TestCase/Database/Schema/MysqlSchemaTest.php index a8491d6c699..ad01049d670 100644 --- a/tests/TestCase/Database/Schema/MysqlSchemaTest.php +++ b/tests/TestCase/Database/Schema/MysqlSchemaTest.php @@ -35,7 +35,7 @@ class MysqlSchemaTest extends TestCase */ protected function _needsConnection() { - $config = ConnectionManager::config('test'); + $config = ConnectionManager::getConfig('test'); $this->skipIf(strpos($config['driver'], 'Mysql') === false, 'Not using Mysql for test config'); } diff --git a/tests/TestCase/Database/Schema/PostgresSchemaTest.php b/tests/TestCase/Database/Schema/PostgresSchemaTest.php index b91f82d72ae..6674c022890 100644 --- a/tests/TestCase/Database/Schema/PostgresSchemaTest.php +++ b/tests/TestCase/Database/Schema/PostgresSchemaTest.php @@ -35,7 +35,7 @@ class PostgresSchemaTest extends TestCase */ protected function _needsConnection() { - $config = ConnectionManager::config('test'); + $config = ConnectionManager::getConfig('test'); $this->skipIf(strpos($config['driver'], 'Postgres') === false, 'Not using Postgres for test config'); } diff --git a/tests/TestCase/Database/Schema/SqliteSchemaTest.php b/tests/TestCase/Database/Schema/SqliteSchemaTest.php index 1888da55429..f979c6e185f 100644 --- a/tests/TestCase/Database/Schema/SqliteSchemaTest.php +++ b/tests/TestCase/Database/Schema/SqliteSchemaTest.php @@ -35,7 +35,7 @@ class SqliteSchemaTest extends TestCase */ protected function _needsConnection() { - $config = ConnectionManager::config('test'); + $config = ConnectionManager::getConfig('test'); $this->skipIf(strpos($config['driver'], 'Sqlite') === false, 'Not using Sqlite for test config'); } diff --git a/tests/TestCase/Database/Schema/SqlserverSchemaTest.php b/tests/TestCase/Database/Schema/SqlserverSchemaTest.php index 7ce81ea06f6..e32ad7b4d9d 100644 --- a/tests/TestCase/Database/Schema/SqlserverSchemaTest.php +++ b/tests/TestCase/Database/Schema/SqlserverSchemaTest.php @@ -34,7 +34,7 @@ class SqlserverSchemaTest extends TestCase */ protected function _needsConnection() { - $config = ConnectionManager::config('test'); + $config = ConnectionManager::getConfig('test'); $this->skipIf(strpos($config['driver'], 'Sqlserver') === false, 'Not using Sqlserver for test config'); } diff --git a/tests/TestCase/ORM/Association/BelongsToManyTest.php b/tests/TestCase/ORM/Association/BelongsToManyTest.php index ab8feef349a..bc3bd0be1ab 100644 --- a/tests/TestCase/ORM/Association/BelongsToManyTest.php +++ b/tests/TestCase/ORM/Association/BelongsToManyTest.php @@ -189,7 +189,7 @@ public function testJunctionConnection() ->setMethods(['setDriver']) ->setConstructorArgs(['name' => 'other_source']) ->getMock(); - ConnectionManager::config('other_source', $mock); + ConnectionManager::setConfig('other_source', $mock); $this->article->connection(ConnectionManager::get('other_source')); $assoc = new BelongsToMany('Test', [ diff --git a/tests/TestCase/ORM/Behavior/TreeBehaviorTest.php b/tests/TestCase/ORM/Behavior/TreeBehaviorTest.php index de097fbaa18..b67352cdd5f 100644 --- a/tests/TestCase/ORM/Behavior/TreeBehaviorTest.php +++ b/tests/TestCase/ORM/Behavior/TreeBehaviorTest.php @@ -667,7 +667,7 @@ public function testRecover() ->order('lft') ->toArray(); $table->updateAll(['lft' => null, 'rght' => null, 'depth' => null], []); - $table->behaviors()->Tree->config('level', 'depth'); + $table->behaviors()->Tree->setConfig('level', 'depth'); $table->recover(); $expected = [ @@ -1223,7 +1223,7 @@ public function testDeleteSubTreeScopedTree() ]; $this->assertMpttValues($expected, $table); - $table->behaviors()->get('Tree')->config('scope', ['menu' => 'categories']); + $table->behaviors()->get('Tree')->setConfig('scope', ['menu' => 'categories']); $expected = [ ' 1:10 - 9:electronics', '_ 2: 9 - 10:televisions', @@ -1418,7 +1418,7 @@ public function testGetLevel() */ public function testSetLevelNewNode() { - $this->table->behaviors()->Tree->config('level', 'depth'); + $this->table->behaviors()->Tree->setConfig('level', 'depth'); $entity = new Entity(['parent_id' => null, 'name' => 'Depth 0']); $this->table->save($entity); @@ -1443,7 +1443,7 @@ public function testSetLevelNewNode() */ public function testSetLevelExistingNode() { - $this->table->behaviors()->Tree->config('level', 'depth'); + $this->table->behaviors()->Tree->setConfig('level', 'depth'); // Leaf node $entity = $this->table->get(4); diff --git a/tests/TestCase/ORM/BehaviorRegistryTest.php b/tests/TestCase/ORM/BehaviorRegistryTest.php index 8ca9933d0a6..a85e24d668b 100644 --- a/tests/TestCase/ORM/BehaviorRegistryTest.php +++ b/tests/TestCase/ORM/BehaviorRegistryTest.php @@ -62,7 +62,7 @@ public function testLoad() $config = ['alias' => 'Sluggable', 'replacement' => '-']; $result = $this->Behaviors->load('Sluggable', $config); $this->assertInstanceOf('TestApp\Model\Behavior\SluggableBehavior', $result); - $this->assertEquals($config, $result->config()); + $this->assertEquals($config, $result->getConfig()); $result = $this->Behaviors->load('TestPlugin.PersisterOne'); $this->assertInstanceOf('TestPlugin\Model\Behavior\PersisterOneBehavior', $result); diff --git a/tests/TestCase/ORM/BehaviorTest.php b/tests/TestCase/ORM/BehaviorTest.php index f88489eafc2..b6efd723fd2 100644 --- a/tests/TestCase/ORM/BehaviorTest.php +++ b/tests/TestCase/ORM/BehaviorTest.php @@ -193,7 +193,7 @@ public function testConstructor() $table = $this->getMockBuilder('Cake\ORM\Table')->getMock(); $config = ['key' => 'value']; $behavior = new TestBehavior($table, $config); - $this->assertEquals($config, $behavior->config()); + $this->assertEquals($config, $behavior->getConfig()); } /** diff --git a/tests/TestCase/ORM/TableTest.php b/tests/TestCase/ORM/TableTest.php index 795428e01be..111239acbf3 100644 --- a/tests/TestCase/ORM/TableTest.php +++ b/tests/TestCase/ORM/TableTest.php @@ -2586,7 +2586,7 @@ public function testSaveNewErrorOnNoPrimaryKey() */ public function testAtomicSave() { - $config = ConnectionManager::config('test'); + $config = ConnectionManager::getConfig('test'); $connection = $this->getMockBuilder('\Cake\Database\Connection') ->setMethods(['begin', 'commit', 'inTransaction']) @@ -2623,7 +2623,7 @@ public function testAtomicSaveRollback() { $connection = $this->getMockBuilder('\Cake\Database\Connection') ->setMethods(['begin', 'rollback']) - ->setConstructorArgs([ConnectionManager::config('test')]) + ->setConstructorArgs([ConnectionManager::getConfig('test')]) ->getMock(); $connection->setDriver(ConnectionManager::get('test')->getDriver()); $table = $this->getMockBuilder('\Cake\ORM\Table') @@ -2663,7 +2663,7 @@ public function testAtomicSaveRollbackOnFailure() { $connection = $this->getMockBuilder('\Cake\Database\Connection') ->setMethods(['begin', 'rollback']) - ->setConstructorArgs([ConnectionManager::config('test')]) + ->setConstructorArgs([ConnectionManager::getConfig('test')]) ->getMock(); $connection->setDriver(ConnectionManager::get('test')->getDriver()); $table = $this->getMockBuilder('\Cake\ORM\Table') diff --git a/tests/TestCase/View/CellTest.php b/tests/TestCase/View/CellTest.php index 7e62bb1b30c..cfb39344eb1 100644 --- a/tests/TestCase/View/CellTest.php +++ b/tests/TestCase/View/CellTest.php @@ -403,7 +403,7 @@ public function testCachedRenderSimple() $mock->expects($this->once()) ->method('write') ->with('cell_test_app_view_cell_articles_cell_display_default', "dummy\n"); - Cache::config('default', $mock); + Cache::setConfig('default', $mock); $cell = $this->View->cell('Articles', [], ['cache' => true]); $result = $cell->render(); @@ -425,7 +425,7 @@ public function testReadCachedCell() ->will($this->returnValue("dummy\n")); $mock->expects($this->never()) ->method('write'); - Cache::config('default', $mock); + Cache::setConfig('default', $mock); $cell = $this->View->cell('Articles', [], ['cache' => true]); $result = $cell->render(); @@ -448,7 +448,7 @@ public function testCachedRenderArrayConfig() $mock->expects($this->once()) ->method('write') ->with('my_key', "dummy\n"); - Cache::config('cell', $mock); + Cache::setConfig('cell', $mock); $cell = $this->View->cell('Articles', [], [ 'cache' => ['key' => 'my_key', 'config' => 'cell'] @@ -473,7 +473,7 @@ public function testCachedRenderSimpleCustomTemplate() $mock->expects($this->once()) ->method('write') ->with('cell_test_app_view_cell_articles_cell_customTemplate_default', "

This is the alternate template

\n"); - Cache::config('default', $mock); + Cache::setConfig('default', $mock); $cell = $this->View->cell('Articles::customTemplate', [], ['cache' => true]); $result = $cell->render(); @@ -490,7 +490,7 @@ public function testCachedRenderSimpleCustomTemplate() */ public function testCachedRenderSimpleCustomTemplateViewBuilder() { - Cache::config('default', [ + Cache::setConfig('default', [ 'className' => 'File', 'path' => CACHE, ]); @@ -512,7 +512,7 @@ public function testCachedRenderSimpleCustomTemplateViewBuilder() */ public function testACachedViewCellReRendersWhenGivenADifferentTemplate() { - Cache::config('default', [ + Cache::setConfig('default', [ 'className' => 'File', 'path' => CACHE, ]); diff --git a/tests/TestCase/View/Helper/TimeHelperTest.php b/tests/TestCase/View/Helper/TimeHelperTest.php index 25a374161e3..0f957ad4bf1 100644 --- a/tests/TestCase/View/Helper/TimeHelperTest.php +++ b/tests/TestCase/View/Helper/TimeHelperTest.php @@ -178,7 +178,7 @@ public function testNice() */ public function testNiceOutputTimezone() { - $this->Time->config('outputTimezone', 'America/Vancouver'); + $this->Time->setConfig('outputTimezone', 'America/Vancouver'); $time = '2014-04-20 20:00'; $this->assertTimeFormat('Apr 20, 2014, 1:00 PM', $this->Time->nice($time)); } @@ -211,7 +211,7 @@ public function testToAtom() */ public function testToAtomOutputTimezone() { - $this->Time->config('outputTimezone', 'America/Vancouver'); + $this->Time->setConfig('outputTimezone', 'America/Vancouver'); $dateTime = new Time; $vancouver = clone $dateTime; $vancouver->timezone('America/Vancouver'); @@ -245,7 +245,7 @@ public function testToRss() */ public function testToRssOutputTimezone() { - $this->Time->config('outputTimezone', 'America/Vancouver'); + $this->Time->setConfig('outputTimezone', 'America/Vancouver'); $dateTime = new Time; $vancouver = clone $dateTime; $vancouver->timezone('America/Vancouver'); @@ -548,7 +548,7 @@ public function testFormat() */ public function testFormatOutputTimezone() { - $this->Time->config('outputTimezone', 'America/Vancouver'); + $this->Time->setConfig('outputTimezone', 'America/Vancouver'); $time = strtotime('Thu Jan 14 8:59:28 2010 UTC'); $result = $this->Time->format($time); @@ -568,7 +568,7 @@ public function testFormatOutputTimezone() */ public function testI18nFormatOutputTimezone() { - $this->Time->config('outputTimezone', 'America/Vancouver'); + $this->Time->setConfig('outputTimezone', 'America/Vancouver'); $time = strtotime('Thu Jan 14 8:59:28 2010 UTC'); $result = $this->Time->i18nFormat($time, \IntlDateFormatter::SHORT); diff --git a/tests/TestCase/View/HelperTest.php b/tests/TestCase/View/HelperTest.php index 9f9356c409b..95e9396cf74 100644 --- a/tests/TestCase/View/HelperTest.php +++ b/tests/TestCase/View/HelperTest.php @@ -98,7 +98,7 @@ public function testSettingsMerging() 'key2' => ['key2.1' => 'val2.1', 'key2.2' => 'newval'], 'key3' => 'val3' ]; - $this->assertEquals($expected, $Helper->config()); + $this->assertEquals($expected, $Helper->getConfig()); } /** diff --git a/tests/TestCase/View/StringTemplateTraitTest.php b/tests/TestCase/View/StringTemplateTraitTest.php index 0d52ae99df6..0c4d7abd8c1 100644 --- a/tests/TestCase/View/StringTemplateTraitTest.php +++ b/tests/TestCase/View/StringTemplateTraitTest.php @@ -85,7 +85,7 @@ public function testInitStringTemplates() */ public function testInitStringTemplatesArrayForm() { - $this->Template->config( + $this->Template->setConfig( 'templates.text', '

{{text}}

' ); diff --git a/tests/TestCase/View/ViewTest.php b/tests/TestCase/View/ViewTest.php index 4908b5d62fb..d1421660fd2 100644 --- a/tests/TestCase/View/ViewTest.php +++ b/tests/TestCase/View/ViewTest.php @@ -989,7 +989,7 @@ public function testElementCacheHelperNoCache() public function testElementCache() { Cache::drop('test_view'); - Cache::config('test_view', [ + Cache::setConfig('test_view', [ 'engine' => 'File', 'duration' => '+1 day', 'path' => CACHE . 'views/', @@ -1074,7 +1074,7 @@ public function testLoadHelper() $View->loadHelper('Html', ['foo' => 'bar']); $this->assertInstanceOf('Cake\View\Helper\HtmlHelper', $View->Html); - $config = $View->Html->config(); + $config = $View->Html->getConfig(); $this->assertEquals('bar', $config['foo']); } @@ -1112,10 +1112,10 @@ public function testLoadHelpers() $this->assertInstanceOf('Cake\View\Helper\HtmlHelper', $View->Html, 'Object type is wrong.'); $this->assertInstanceOf('Cake\View\Helper\FormHelper', $View->Form, 'Object type is wrong.'); - $config = $View->Html->config(); + $config = $View->Html->getConfig(); $this->assertEquals('bar', $config['foo']); - $config = $View->Form->config(); + $config = $View->Form->getConfig(); $this->assertEquals('baz', $config['foo']); } @@ -1141,7 +1141,7 @@ public function testLazyLoadHelpers() public function testInitialize() { $View = new TestView(); - $config = $View->Html->config(); + $config = $View->Html->getConfig(); $this->assertEquals('myval', $config['mykey']); }