protected function setUp() { $this->searchContextClass = '\\aik099\\QATools\\BEM\\Element\\IBlock'; $this->locatorClass = '\\aik099\\QATools\\BEM\\ElementLocator\\BEMElementLocator'; $this->_locatorHelper = m::mock('\\aik099\\QATools\\BEM\\ElementLocator\\LocatorHelper'); parent::setUp(); }
/** * Creates locator. * * @param array $mock_methods Mock methods. * * @return IElementLocator */ protected function createLocator(array $mock_methods = array()) { $timeout_annotations = array(); if (substr($this->getName(false), -11) == 'WithTimeout') { $timeout_annotation = new TimeoutAnnotation(); $timeout_annotation->duration = self::TIMEOUT; $timeout_annotations = array($timeout_annotation); } $this->property->shouldReceive('getAnnotationsFromPropertyOrClass')->with('@timeout')->once()->andReturn($timeout_annotations); return parent::createLocator($mock_methods); }