Esempio n. 1
0
 public function testCanGetValueFromConfig()
 {
     $config = Menu::getOption('max_depth');
     $this->assertEquals(-1, $config);
     $config = Menu::getOption();
     $this->assertInternalType('array', $config);
 }
Esempio n. 2
0
 /**
  * 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);
 }