8 use \Magento\Framework\Config\Dom\NodeMergingConfig;
24 $this->nodePathMatcher = $this->createMock(\
Magento\Framework\Config\
Dom\NodePathMatcher::class);
26 $this->nodePathMatcher,
27 [
'/root/one' =>
'name',
'/root/two' =>
'id',
'/root/three' =>
'key']
33 $xpath =
'/root/two[@attr="value"]';
34 $this->nodePathMatcher->expects(
42 $this->returnValue(
false)
44 $this->nodePathMatcher->expects(
52 $this->returnValue(
true)
54 $this->assertEquals(
'id', $this->object->getIdAttribute($xpath));
59 $xpath =
'/root/four[@attr="value"]';
60 $this->nodePathMatcher->expects(
68 $this->returnValue(
false)
70 $this->nodePathMatcher->expects(
78 $this->returnValue(
false)
80 $this->nodePathMatcher->expects(
88 $this->returnValue(
false)
90 $this->assertNull($this->object->getIdAttribute($xpath));
testGetIdAttributeNotMatched()
testGetIdAttributeMatched()