Ejemplo n.º 1
0
 /**
  * @see LiveTest\Config\Tags\TestSuite.Base::doProcess()
  */
 protected function doProcess(\LiveTest\Config\TestSuite $config, $parameters)
 {
     $config->getCurrentSession()->doNotInherit();
     foreach ($parameters as $file) {
         $config->getCurrentSession()->includePageRequests(Request::createRequestsFromParameters(file($config->getBaseDir() . '/' . $file), $config->getDefaultDomain()));
     }
 }
Ejemplo n.º 2
0
 /**
  * @see LiveTest\Config\Tags\TestSuite.Base::doProcess()
  */
 protected function doProcess(\LiveTest\Config\TestSuite $config, $parameters)
 {
     $requests = SymfonyRequest::createRequestsFromParameters($parameters, $config->getDefaultDomain());
     if ($config->hasSessions()) {
         $config->getCurrentSession()->includePageRequests($requests);
     } else {
         throw new ConfigurationException('You can not use the Page tag outside a session tag.');
     }
 }
Ejemplo n.º 3
0
 /**
  * @see LiveTest\Config\Tags\TestSuite.Base::doProcess()
  *
  * @fixme does not work if no Pages are added
  */
 protected function doProcess(\LiveTest\Config\TestSuite $config, $testsuites)
 {
     foreach ($testsuites as $testsuite) {
         $filename = $testsuite['filename'];
         unset($testsuite['filename']);
         // @todo must be part of base library
         if (strpos($filename, '/') > 0) {
             $filename = $config->getBaseDir() . '/' . $filename;
         }
         try {
             $yaml = new Yaml($filename);
         } catch (\Exception $e) {
             throw new ConfigurationException("Error parsing included testsuite '" . $filename . "': " . $e->getMessage(), null, $e);
         }
         $testSuiteConfig = new TestSuite($config->getCurrentSession(), $config);
         $testSuiteConfig->setDefaultDomain($config->getDefaultDomain());
         $parameters = $yaml->toArray();
         $this->getParser()->parse($parameters, $testSuiteConfig);
         $this->getParser()->parse($testsuite, $testSuiteConfig);
     }
 }
Ejemplo n.º 4
0
 /**
  * @see LiveTest\Config\Tags\TestSuite.Base::doProcess()
  */
 protected function doProcess(\LiveTest\Config\TestSuite $config, $parameters)
 {
     $config->getCurrentSession()->excludePageRequests(Request::createRequestsFromParameters($parameters, $config->getDefaultDomain()));
 }