getConfig() public method

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
return array | mixed | null
 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'));
 }