-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed #13201: Inconsistent config merging
Removed __set_state method `Phalcon/Config` now extends `ArrayObject` Merging is done properly Assignment works as expected _all_ the time
- Loading branch information
1 parent
3f95539
commit c8620dc
Showing
6 changed files
with
347 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ | |
|
||
namespace Phalcon\Test\Unit\Config; | ||
|
||
use Phalcon\Config; | ||
use Phalcon\Test\Fixtures\Traits\ConfigTrait; | ||
use UnitTester; | ||
|
||
|
@@ -20,14 +21,34 @@ class GetCest | |
use ConfigTrait; | ||
|
||
/** | ||
* Tests Phalcon\Config :: get() | ||
* Tests Phalcon\Config :: __get() | ||
* | ||
* @author Phalcon Team <[email protected]> | ||
* @since 2018-11-13 | ||
* @author Cameron Hall <[email protected]> | ||
* @since 2019-06-17 | ||
*/ | ||
public function configGetter(UnitTester $I) | ||
{ | ||
$I->wantToTest('Config - get()'); | ||
$config = $this->getConfig(); | ||
$I->assertEquals( | ||
$config->database->adapter, | ||
$this->config['database']['adapter'] | ||
); | ||
} | ||
|
||
/** | ||
* Tests Phalcon\Config :: __get() | ||
* | ||
* @author Cameron Hall <[email protected]> | ||
* @since 2019-06-17 | ||
*/ | ||
public function configGet(UnitTester $I) | ||
{ | ||
$I->wantToTest('Config - get()'); | ||
$this->checkGet($I); | ||
$config = $this->getConfig(); | ||
$I->assertEquals( | ||
$config->get('database')->get('adapter'), | ||
$this->config['database']['adapter'] | ||
); | ||
} | ||
} |
Oops, something went wrong.