Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' into hotfix/translator-caching
Browse files Browse the repository at this point in the history
  • Loading branch information
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion src/Processor/Token.php
Expand Up @@ -200,7 +200,7 @@ protected function buildMap()
*
* @param Config $config
* @return Config
* @throws InvalidArgumentException
* @throws Exception\InvalidArgumentException
*/
public function process(Config $config)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Reader/Ini.php
Expand Up @@ -63,7 +63,7 @@ public function getNestSeparator()
* @see ReaderInterface::fromFile()
* @param string $filename
* @return array
* @throws Exception\InvalidArgumentException
* @throws Exception\RuntimeException
*/
public function fromFile($filename)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Reader/Yaml.php
Expand Up @@ -56,7 +56,7 @@ public function __construct($yamlDecoder = null)
*
* @param string|callable $yamlDecoder the decoder to set
* @return Yaml
* @throws Exception\InvalidArgumentException
* @throws Exception\RuntimeException
*/
public function setYamlDecoder($yamlDecoder)
{
Expand Down
44 changes: 22 additions & 22 deletions test/ConfigTest.php
Expand Up @@ -330,42 +330,42 @@ public function testMerge()
$this->assertEquals('bar', $configA->text);

// config->numerical-> ...
$this->assertInstanceOf('\Zend\Config\Config',$configA->numerical);
$this->assertEquals('first',$configA->numerical->{0});
$this->assertEquals('second',$configA->numerical->{1});
$this->assertInstanceOf('\Zend\Config\Config', $configA->numerical);
$this->assertEquals('first', $configA->numerical->{0});
$this->assertEquals('second', $configA->numerical->{1});

// config->numerical->{2}-> ...
$this->assertInstanceOf('\Zend\Config\Config',$configA->numerical->{2});
$this->assertEquals('third',$configA->numerical->{2}->{0});
$this->assertEquals(null,$configA->numerical->{2}->{1});
$this->assertInstanceOf('\Zend\Config\Config', $configA->numerical->{2});
$this->assertEquals('third', $configA->numerical->{2}->{0});
$this->assertEquals(null, $configA->numerical->{2}->{1});

// config->numerical-> ...
$this->assertEquals('fourth',$configA->numerical->{3});
$this->assertEquals('fifth',$configA->numerical->{4});
$this->assertEquals('fourth', $configA->numerical->{3});
$this->assertEquals('fifth', $configA->numerical->{4});

// config->numerical->{5}
$this->assertInstanceOf('\Zend\Config\Config',$configA->numerical->{5});
$this->assertEquals('sixth',$configA->numerical->{5}->{0});
$this->assertEquals(null,$configA->numerical->{5}->{1});
$this->assertInstanceOf('\Zend\Config\Config', $configA->numerical->{5});
$this->assertEquals('sixth', $configA->numerical->{5}->{0});
$this->assertEquals(null, $configA->numerical->{5}->{1});

// config->misaligned
$this->assertInstanceOf('\Zend\Config\Config',$configA->misaligned);
$this->assertEquals('foo',$configA->misaligned->{2});
$this->assertEquals('bar',$configA->misaligned->{3});
$this->assertEquals('baz',$configA->misaligned->{4});
$this->assertEquals(null,$configA->misaligned->{0});
$this->assertInstanceOf('\Zend\Config\Config', $configA->misaligned);
$this->assertEquals('foo', $configA->misaligned->{2});
$this->assertEquals('bar', $configA->misaligned->{3});
$this->assertEquals('baz', $configA->misaligned->{4});
$this->assertEquals(null, $configA->misaligned->{0});

// config->mixed
$this->assertInstanceOf('\Zend\Config\Config',$configA->mixed);
$this->assertEquals('bar',$configA->mixed->foo);
$this->assertSame(false,$configA->mixed->{0});
$this->assertSame(null,$configA->mixed->{1});
$this->assertInstanceOf('\Zend\Config\Config', $configA->mixed);
$this->assertEquals('bar', $configA->mixed->foo);
$this->assertSame(false, $configA->mixed->{0});
$this->assertSame(null, $configA->mixed->{1});

// config->replaceAssoc
$this->assertSame(null,$configA->replaceAssoc);
$this->assertSame(null, $configA->replaceAssoc);

// config->replaceNumerical
$this->assertSame(true,$configA->replaceNumerical);
$this->assertSame(true, $configA->replaceNumerical);

}

Expand Down
2 changes: 1 addition & 1 deletion test/FactoryTest.php
Expand Up @@ -128,7 +128,7 @@ public function testFactoryCanRegisterCustomReaderInstance()
public function testFactoryCanRegisterCustomReaderPlugn()
{
$dummyReader = new Reader\TestAssets\DummyReader();
Factory::getReaderPluginManager()->setService('DummyReader',$dummyReader);
Factory::getReaderPluginManager()->setService('DummyReader', $dummyReader);

Factory::registerReader('dum', 'DummyReader');

Expand Down

0 comments on commit cf95523

Please sign in to comment.