registerConfig() public static method

public static registerConfig ( $customConfig ) : ConfigRepository
$customConfig
return Ouzo\Config\ConfigRepository
Exemplo n.º 1
0
 /**
  * @param $config
  * @return $this
  */
 public function addConfig($config)
 {
     $this->configRepository = Config::registerConfig($config);
     return $this;
 }
Exemplo n.º 2
0
 /**
  * @test
  * @expectedException InvalidArgumentException
  * @expectedExceptionMessage Custom config method getConfig must be public
  */
 public function shouldThrowExceptionWhenTryToAddCustomConfigWhenGetConfigMethodIsNotPublic()
 {
     //when
     Config::registerConfig(new PrivateGetConfigMethod());
 }