/**
  * @dataProvider incorrectXPathsProvider
  * @expectedException \Siso\Bundle\ContentLoaderBundle\Tree\Exceptions\XPathMatcherException
  * @param string $xpath
  */
 public function testIncorrectXPaths($xpath)
 {
     $data = ['a' => ['b' => 'b-value']];
     $tree = new Tree($data);
     $node = $tree->getRoot()->getChildByName('a')->getChildByName('b');
     $matcher = new XPathMatcher();
     $this->assertTrue($matcher->matches($node, $xpath));
 }
 /**
  * @inheritdoc
  */
 public function isPathMatched($xpath)
 {
     $xpathMatcher = new XPathMatcher();
     return $xpathMatcher->matches($this, $xpath);
 }