getConfig() 공개 메소드

Look for config $name if found return it, if not return null. If $name is not set return all set config.
public getConfig ( string | null $name = null ) : array | mixed | null
$name string | null
리턴 array | mixed | null
예제 #1
0
 public function testCommandWithConfigCorrectConfig()
 {
     $this->assertAttributeEquals(['config_key' => 'config_value'], 'config', $this->command_stub_with_config);
     $this->assertEquals(['config_key' => 'config_value'], $this->command_stub_with_config->getConfig(null));
     $this->assertEquals(['config_key' => 'config_value'], $this->command_stub_with_config->getConfig());
     $this->assertEquals('config_value', $this->command_stub_with_config->getConfig('config_key'));
     $this->assertEquals(null, $this->command_stub_with_config->getConfig('not_config_key'));
 }