Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function createPage($name)
 {
     $pageClass = $this->classNameResolver->resolvePage($name);
     return $this->create($pageClass);
 }
 function it_should_create_an_element(ClassNameResolver $classNameResolver)
 {
     $classNameResolver->resolveElement('Search box')->willReturn('SearchBox');
     $this->createElement('Search box')->shouldBeAnInstanceOf('SearchBox');
 }
 /**
  * @param string $name
  *
  * @return Element
  */
 public function createElement($name)
 {
     $elementClass = $this->classNameResolver->resolveElement($name);
     return $this->instantiateElement($elementClass);
 }