예제 #1
0
 /**
  * Initializes the page.
  *
  * @param Page $page Page to initialize.
  *
  * @return self
  */
 public function initPage(Page $page)
 {
     /* @var $annotations PageUrlAnnotation[] */
     $annotations = $this->annotationManager->getClassAnnotations($page, '@page-url');
     if (empty($annotations)) {
         return $this;
     }
     $page->setUrlBuilder($this->urlBuilderFactory->getUrlBuilder($annotations[0]->url, $annotations[0]->params, $this->config->getOption('base_url')));
     return $this;
 }
예제 #2
0
 /**
  * @dataProvider getOptionWithFailureDataProvider
  *
  * @expectedException \aik099\QATools\PageObject\Exception\ConfigException
  * @expectedExceptionCode \aik099\QATools\PageObject\Exception\ConfigException::TYPE_NOT_FOUND
  */
 public function testGetOptionWithFailure(array $options, $name)
 {
     $config = new Config($options);
     $config->getOption($name);
 }