public function BlockStyleBaseTest::testExclude in Block Style Plugins 8
Tests the exclude method.
@dataProvider excludeProvider
See also
::exclude()
File
- tests/
src/ Unit/ Plugin/ BlockStyleBaseTest.php, line 347
Class
- BlockStyleBaseTest
- @coversDefaultClass \Drupal\block_style_plugins\Plugin\BlockStyleBase @group block_style_plugins
Namespace
Drupal\Tests\block_style_plugins\Unit\PluginCode
public function testExclude($plugin, $bundle, $expected) {
// Stub the blockPlugin.
$this
->setProtectedProperty('blockPlugin', $this->blockPlugin
->reveal());
if ($plugin) {
$this
->setProtectedProperty('pluginDefinition', [
'exclude' => [
$plugin,
],
]);
}
if ($bundle) {
$this
->setProtectedProperty('blockContentBundle', $bundle);
}
$return = $this->plugin
->exclude();
$this
->assertEquals($expected, $return);
}