/**
  * @expectedException \aik099\QATools\PageObject\Exception\AnnotationException
  * @expectedExceptionCode \aik099\QATools\PageObject\Exception\AnnotationException::TYPE_REQUIRED
  */
 public function testGetSelectorFailure()
 {
     $this->property->shouldReceive('__toString')->andReturn('OK');
     $this->property->shouldReceive('getDataType')->andReturnNull();
     $this->property->shouldReceive('getAnnotationsFromPropertyOrClass')->with('@find-by')->andReturn(array());
     $this->assertCount(0, $this->locator->findAll());
 }
 /**
  * Find the element list.
  *
  * @return NodeElement[]
  */
 public function findAll()
 {
     if ($this->timeout == 0) {
         return parent::findAll();
     }
     return $this->searchContext->waitFor($this->timeout, array($this, 'parent::findAll'));
 }
 /**
  * Creates a new element locator.
  *
  * @param Property          $property           Property.
  * @param ISearchContext    $search_context     The context to use when finding the element.
  * @param AnnotationManager $annotation_manager Annotation manager.
  * @param LocatorHelper     $locator_helper     Locator helper.
  */
 public function __construct(Property $property, ISearchContext $search_context, AnnotationManager $annotation_manager, LocatorHelper $locator_helper)
 {
     parent::__construct($property, $search_context, $annotation_manager);
     $this->_helper = $locator_helper;
 }