Example #1
0
 protected function setUp()
 {
     parent::setUp();
     $this->pageFactory->shouldReceive('initPage')->once()->andReturn($this->pageFactory);
     $this->pageFactory->shouldReceive('initElements')->once()->andReturn($this->pageFactory);
     $decorator = m::mock('\\aik099\\QATools\\PageObject\\PropertyDecorator\\IPropertyDecorator');
     $this->pageFactory->shouldReceive('createDecorator')->once()->andReturn($decorator);
     $this->urlBuilderFactory = m::mock('\\aik099\\QATools\\PageObject\\Url\\IUrlBuilderFactory');
     $this->page = new $this->pageClass($this->pageFactory);
 }
 protected function setUp()
 {
     parent::setUp();
     if (is_null($this->elementClass)) {
         $this->elementClass = '\\tests\\aik099\\QATools\\HtmlElements\\Fixture\\Element\\TypifiedElementChild';
     }
     $this->webElement = m::mock(self::WEB_ELEMENT_CLASS);
     $this->webElement->shouldReceive('getSession')->withNoArgs()->andReturn($this->session);
     $this->setUpBeforeCreateElement();
     $this->typifiedElement = $this->createElement();
 }
 protected function setUp()
 {
     parent::setUp();
     $this->pageFactory->shouldReceive('initPage')->andReturn(\Mockery::self());
     $this->pageFactory->shouldReceive('initElementContainer')->andReturn(\Mockery::self());
     $this->pageFactory->shouldReceive('initElements')->andReturn(\Mockery::self());
     $this->selectorsHandler->shouldReceive('isSelectorRegistered')->andReturn(false);
     $this->selectorsHandler->shouldReceive('registerSelector')->with('se', m::any())->andReturnNull();
     $this->annotationManager = m::mock(self::ANNOTATION_MANAGER_CLASS);
     $this->urlBuilderFactory = m::mock(self::URL_BUILDER_FACTORY_INTERFACE);
     $this->config = new Config(array('base_url' => 'http://domain.tld'));
     $this->realFactory = $this->createFactory();
 }
 protected function setUp()
 {
     parent::setUp();
     $this->property = m::mock('\\aik099\\QATools\\PageObject\\Property');
     $this->locator = m::mock($this->locatorClass);
     $this->locatorFactory = m::mock('\\aik099\\QATools\\PageObject\\ElementLocator\\IElementLocatorFactory');
     if ($this->getName() == 'testEmptyLocatorPreventsDecoration') {
         $this->locatorFactory->shouldReceive('createLocator')->andReturnNull();
     } else {
         $this->locatorFactory->shouldReceive('createLocator')->andReturn($this->locator);
     }
     $this->decorator = new $this->decoratorClass($this->locatorFactory, $this->pageFactory);
 }
 protected function setUp()
 {
     parent::setUp();
     $this->beforeSetUpFinish();
     $this->element = $this->createElement();
 }