public function testMergeRegistry() { $targetConfig = ['foo' => 'foo', 'bar' => 'foo']; $target = new Services(); $target->add($targetConfig); $sourceConfig = ['bar' => 'bar', 'baz' => 'baz']; $source = new Services(); $source->add($sourceConfig); $return = $target->merge($source); $this->assertSame($return, $target); $expected = ['foo' => $targetConfig['foo'], 'bar' => $sourceConfig['bar'], 'baz' => $sourceConfig['baz']]; $this->assertSame($expected, $target->getRegistry()); }
public function testGetRegistry() { $config = ['foo' => 'foo', 'bar' => 'bar', 'baz' => 'baz']; $locator = new Services(); $locator->add($config); $this->assertSame($config, $locator->getRegistry()); }