/**
  * Creates annotation instance, that matcher will use.
  *
  * @param array $parameters Parameters.
  *
  * @return MatchUrlExactAnnotation
  */
 public function createAnnotation(array $parameters)
 {
     $annotation = new MatchUrlExactAnnotation();
     $annotation->initAnnotation($parameters);
     return $annotation;
 }
 public function testInvalidAnnotation()
 {
     $annotation = new MatchUrlExactAnnotation();
     $this->assertFalse($annotation->isValid());
 }
Example #3
0
 /**
  * Sets expectation for full url match annotations and returns them.
  *
  * @param AnnotationManager $annotation_manager The annotation manager.
  * @param array             $annotations_data   Url match.
  *
  * @return array
  */
 protected function expectMatchUrlExactAnnotation(Page $page, $annotations_data = array())
 {
     $annotations = array();
     foreach ($annotations_data as $annotation_params) {
         $annotation = new MatchUrlExactAnnotation();
         $annotation->initAnnotation($annotation_params);
         $annotations[] = $annotation;
     }
     $this->annotationManager->shouldReceive('getClassAnnotations')->with($page, '@match-url-exact')->andReturn($annotations);
     return $annotations;
 }