public function setUp() { $optionsAndValues = $this->getOptionsAndValues(); $configuration = new Configuration(); $configuration->setUrlToLint(self::URL_TO_LINT); foreach ($optionsAndValues as $optionName => $optionValue) { $configuration->setOption($optionName, $optionValue); } $this->assertEquals($this->getExpectedFlaglessExecutableCommandPrefix() . ' ' . $this->getExpectedOptionsString() . ' ' . $this->getExpectedExecutableCommandSuffix(), $configuration->getExecutableCommand()); }
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()); }
public function testWithoutUrlToLintThrowsUnexpectedValueException() { $this->setExpectedException('UnexpectedValueException', 'URL to lint not present; set this first with ->setUrlToLint()', 1); $configuration = new Configuration(); $configuration->getExecutableCommand(); }
public function testDefaultExecutableCommandContainsRemoteUrl() { $configuration = new Configuration(); $configuration->setUrlToLint(self::URL_TO_LINT); $this->assertEquals($this->getExpectedFlaglessExecutableCommandPrefix() . ' ' . $this->getExpectedExecutableCommandSuffix(), $configuration->getExecutableCommand()); }