/**
* Tests getDeriverClass with classed objects instead of arrays.
*
* @covers ::getDeriverClass
*/
public function testGetDeriverClassWithClassedDefinitions() { $definitions =
[];
$definition =
$this->
prophesize(DerivablePluginDefinitionInterface::
class);
$definition->
id()->
willReturn('non_container_aware_discovery'
);
$definition->
getDeriver()->
willReturn(TestDerivativeDiscoveryWithObject::
class);
$definitions['non_container_aware_discovery'
] =
$definition->
reveal();
$this->discoveryMain->
expects($this->
any()) ->
method('getDefinitions'
) ->
willReturn($definitions);
$discovery =
new DerivativeDiscoveryDecorator($this->discoveryMain
);
$definitions =
$discovery->
getDefinitions();
// Ensure that both test derivatives got added.
$this->
assertContainsOnlyInstancesOf(DerivablePluginDefinitionInterface::
class,
$definitions);