'id' => 'decorated_test_2',
'name' => 'Decorated test 1',
'provider' => 'decorated_2',
],
];
$decorated =
$this->
createMock('Drupal\Component\Plugin\Discovery\DiscoveryInterface'
);
$decorated->
expects($this->
once()) ->
method('getDefinitions'
) ->
willReturn($definitions);
$this->discoveryDecorator =
new YamlDiscoveryDecorator($decorated, 'test',
$directories);
} /**
* Tests the getDefinitions() method.
*/
public function testGetDefinitions() { $definitions =
$this->discoveryDecorator->
getDefinitions();
$this->
assertIsArray($definitions);
$this->
assertCount(6,
$definitions);