コード例 #1
0
 public function setUp()
 {
     $this->setTestFixturePath(__CLASS__);
     $this->setHttpFixtures($this->getHttpFixtures($this->getFixturesDataPath() . '/HttpResponses'));
     $configuration = new Configuration();
     $configuration->setUrlToValidate('http://example.com/');
     $configuration->setHttpClient($this->getHttpClient());
     $this->wrapper = $this->getNewCssValidatorWrapper();
     $this->wrapper->setConfiguration($configuration);
     $this->wrapper->setCssValidatorRawOutput($this->getFixture('domains-to-ignore.txt'));
 }
 public function setUp()
 {
     $this->setTestFixturePath(__CLASS__, $this->getName());
     $this->setHttpFixtures($this->getHttpFixtures($this->getFixturesDataPath() . '/HttpResponses'));
     $configuration = new Configuration();
     $configuration->setUrlToValidate('http://example.com/foo"bar');
     $configuration->setHttpClient($this->getHttpClient());
     $configuration->setContentToValidate(file_get_contents($this->getFixturesDataPath() . '/WebResourceContent/rootWebResource.html'));
     $this->wrapper = $this->getNewCssValidatorWrapper();
     $this->wrapper->setConfiguration($configuration);
 }
 public function setUp()
 {
     $this->setTestFixturePath(__CLASS__, $this->getName());
     $this->setHttpFixtures($this->getHttpFixtures($this->getFixturesDataPath() . '/HttpResponses'));
     $configuration = new Configuration();
     $configuration->setUrlToValidate('http://en.wikipedia.org/');
     $configuration->setHttpClient($this->getHttpClient());
     $this->wrapper = $this->getNewCssValidatorWrapper();
     $this->wrapper->setConfiguration($configuration);
     $this->wrapper->setCssValidatorRawOutput($this->getFixture('/CssValidatorOutput/1'));
 }
 public function setUp()
 {
     $this->setTestFixturePath(__CLASS__);
     $this->setHttpFixtures($this->getHttpFixtures($this->getFixturesDataPath() . '/HttpResponses'));
     $configuration = new Configuration();
     $configuration->setUrlToValidate('http://example.com/');
     $configuration->setHttpClient($this->getHttpClient());
     $this->wrapper = $this->getNewCssValidatorWrapper();
     $this->wrapper->setConfiguration($configuration);
     $this->wrapper->enableDeferToParentIfNoRawOutput();
     $this->wrapper->setCssValidatorRawOutput($this->getFixture('no-messages.txt'));
 }
 public function setUp()
 {
     $this->setTestFixturePath(__CLASS__);
     $this->setHttpFixtures($this->getHttpFixtures($this->getFixturesDataPath($this->getName()) . '/HttpResponses'));
     $configuration = new Configuration();
     $configuration->setUrlToValidate('http://grantammons.me/');
     $configuration->setHttpClient($this->getHttpClient());
     $configuration->setContentToValidate(file_get_contents($this->getFixturesDataPath() . '/WebResourceContent/rootWebResource.html'));
     $this->wrapper = $this->getNewCssValidatorWrapper();
     $this->wrapper->setConfiguration($configuration);
     $this->wrapper->setCssValidatorRawOutput($this->getFixture('no-messages.txt'));
     $this->wrapper->enableDeferToParentIfNoRawOutput();
 }
コード例 #6
0
 public function testHasConfigurationWhenConfigurationIsSet()
 {
     $wrapper = new CssValidatorWrapper();
     $this->assertTrue($wrapper->setConfiguration(new Configuration())->hasConfiguration());
 }