public function testCanGetValueFromConfig() { $config = Menu::getOption('max_depth'); $this->assertEquals(-1, $config); $config = Menu::getOption(); $this->assertInternalType('array', $config); }
/** * Get a particular option in the array * * @param string $option An option * * @return mixed Its value */ public function getOption($option = null) { $globalOptions = Menu::getOption(); $combinedOptions = array_replace_recursive($globalOptions, $this->options); if (!$option) { return $combinedOptions; } return ArraysMethods::get($combinedOptions, $option); }