Ejemplo n.º 1
0
 public function test_create_creates_HtmlParser_if_isCli_false()
 {
     $this->resolver->expects($this->once())->method('isCli')->will($this->returnValue(false));
     $parser = $this->factory->create();
     $this->assertInstanceOf('\\Habitat\\Parser\\HtmlParser', $parser);
 }
Ejemplo n.º 2
0
 /**
  * Constructor
  *
  * @param SapiResolverInterface $resolver
  */
 public function __construct(SapiResolverInterface $resolver)
 {
     $factory = new ParserFactory($resolver);
     $this->parser = $factory->create();
 }