public function ResolveDefaultPluginTest::testGetDefaultPluginInstance in Plugin 8.2
@covers ::getDefaultPluginInstance @covers ::setDefaultPluginInstance
File
- tests/
src/ Unit/ Event/ ResolveDefaultPluginTest.php, line 59
Class
- ResolveDefaultPluginTest
- @coversDefaultClass \Drupal\plugin\Event\ResolveDefaultPlugin
Namespace
Drupal\Tests\plugin\Unit\EventCode
public function testGetDefaultPluginInstance() {
$default_plugin_instance = $this
->createMock(PluginInspectionInterface::class);
$this
->assertNull($this->sut
->getDefaultPluginInstance());
$this
->assertSame($this->sut, $this->sut
->setDefaultPluginInstance($default_plugin_instance));
$this
->assertSame($default_plugin_instance, $this->sut
->getDefaultPluginInstance());
}