public function testLocalPathIsTranslatedToFileUrl() { $path = '/home/example/foo/.js'; $expectedPath = 'file:' . $path; $configuration = new Configuration(); $this->assertEquals($expectedPath, $configuration->setUrlToLint($path)->getUrlToLint()); }
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 testDefaultExecutableCommandContainsRemoteUrl() { $configuration = new Configuration(); $configuration->setUrlToLint(self::URL_TO_LINT); $this->assertEquals($this->getExpectedFlaglessExecutableCommandPrefix() . ' ' . $this->getExpectedExecutableCommandSuffix(), $configuration->getExecutableCommand()); }