overridePropertyArray() public static method

public static overridePropertyArray ( $keys, $value ) : void
$keys
$value
return void
Example #1
0
 public static function tearDownAfterClass()
 {
     Config::overrideProperty('debug')->with(true);
     Config::overrideProperty('language')->with('en');
     Config::overridePropertyArray(array('global', 'prefix_system'), '');
     if (Files::exists('/tmp/SampleConfigFile.php')) {
         unlink('/tmp/SampleConfigFile.php');
     }
 }
Example #2
0
 /**
  * @test
  */
 public function shouldNotStoreEmptyUrlForNotices()
 {
     //given
     Config::overridePropertyArray(array('global', 'prefix_system'), 'prefix');
     $_SESSION = array();
     $controller = Controller::createInstance(new RouteRule('', '', '', '', false));
     //when
     $controller->notice('hello');
     //then
     Assert::thatArray(Session::get('messages'))->containsOnly(new Notice('hello', null));
     Config::revertPropertyArray(array('global', 'prefix_system'));
 }
 public function with($value)
 {
     Config::overridePropertyArray($this->keys, $value);
 }