public function testSortedDefinitions() { $definitions =
$this->blockManager->
getSortedDefinitions();
$this->
assertSame(['block2', 'block3', 'block1'
],
array_keys($definitions));
} /**
* @covers ::getGroupedDefinitions
*/
public function testGroupedDefinitions() { $definitions =
$this->blockManager->
getGroupedDefinitions();
$this->
assertSame(['Group 1', 'Group 2'
],
array_keys($definitions));
$this->
assertSame(['block2'
],
array_keys($definitions['Group 1'
]));
$this->
assertSame(['block3', 'block1'
],
array_keys($definitions['Group 2'
]));
} /**
* @covers ::handlePluginNotFound
*/
public function testHandlePluginNotFound() { $this->logger->
warning('The "%plugin_id" was not found',
['%plugin_id' => 'invalid'
])->
shouldBeCalled();
$plugin =
$this->blockManager->
createInstance('invalid'
);