public function testEnableInvalidFlagThrowsInvalidArgumentException() { $flagName = 'foo'; $this->setExpectedException('InvalidArgumentException', 'Flag "' . $flagName . '" is not valid', 1); $configuration = new Configuration(); $configuration->enableFlag($flagName); }
public function setUp() { $key = str_replace('test', '', strtolower($this->getName())); $flagNames = $this->getAllFlagNames(); $flagName = $flagNames[$key]; $configuration = new Configuration(); $configuration->enableFlag($flagName); }
public function setUp() { $key = str_replace('test', '', strtolower($this->getName())); $flagName = $this->flags[$key]; $configuration = new Configuration(); $configuration->enableFlag($flagName); $configuration->unsetFlag($flagName); $this->assertFalse($configuration->hasFlag($flagName)); }
public function setUp() { $flagsAndValues = $this->getFlagsAndValues(); $configuration = new Configuration(); $configuration->setUrlToLint(self::URL_TO_LINT); foreach ($flagsAndValues as $name => $value) { if ($value) { $configuration->enableFlag($name); } else { $configuration->disableFlag($name); } } $this->assertEquals($this->getExpectedExecutableCommandPrefix() . ' ' . $this->getExpectedFlagsString() . ' ' . $this->getExpectedExecutableCommandSuffix(), $configuration->getExecutableCommand()); }