configSet('General', 'foo', 'bar'); $this->assertSame('./console config:set --section="General" --key="foo" --value="bar"', '' . $config); } public function testExecKnownSectionKnownKey() { $this->configSet('General', 'time_before_today_archive_considered_outdated', 876)->exec(); $general = Config::getInstance()->General; $this->assertEquals('876', $general['time_before_today_archive_considered_outdated']); } public function testExecKnownSectionUnknownKey() { $this->configSet('General', 'foobar', '192')->exec(); $general = Config::getInstance()->General; $this->assertEquals('192', $general['foobar']); } public function testExecUnknownCategory() { $this->configSet('foobar', 'baz', 'hello')->exec(); $baz = Config::getInstance()->foobar; $this->assertEquals('hello', $baz['baz']); } private function configSet($section, $key, $value) { return new Set($section, $key, $value); } }