/** * @param ApplicationConfig $config * @param string $prefix * * @throws InvalidArgumentException */ public function __construct(ApplicationConfig $config, $prefix) { Assertion::string($prefix); $this->prefix = $prefix; $this->config = $config; $this->provides = array_map(function ($key) { return $this->keyPrefix() . $key; }, $config->getKeys()); }
public function testItReturnsAllItsKeys() { assertEquals(['keyA', 'group1', 'group1.keyB', 'group1.null'], $this->config->getKeys()); }