public function BlockStyleBaseTest::testCreate in Block Style Plugins 8
Same name and namespace in other branches
- 8.2 tests/src/Unit/Plugin/BlockStyleBaseTest.php \Drupal\Tests\block_style_plugins\Unit\Plugin\BlockStyleBaseTest::testCreate()
Tests the create method.
See also
::create()
File
- tests/
src/ Unit/ Plugin/ BlockStyleBaseTest.php, line 101
Class
- BlockStyleBaseTest
- @coversDefaultClass \Drupal\block_style_plugins\Plugin\BlockStyleBase @group block_style_plugins
Namespace
Drupal\Tests\block_style_plugins\Unit\PluginCode
public function testCreate() {
$configuration = [];
$plugin_id = 'block_style_plugins';
$plugin_definition['provider'] = 'block_style_plugins';
$container = $this
->prophesize(ContainerInterface::CLASS);
$container
->get('entity.repository')
->willReturn($this->entityRepository
->reveal());
$container
->get('entity_type.manager')
->willReturn($this->entityTypeManager
->reveal());
$instance = MockBlockStyleBase::create($container
->reveal(), $configuration, $plugin_id, $plugin_definition);
$this
->assertInstanceOf('Drupal\\block_style_plugins\\Plugin\\BlockStyleInterface', $instance);
}