You are here

public function PluginSelectorBaseTest::testGetSelectedPlugin in Plugin 8.2

@covers ::setSelectedPlugin @covers ::getSelectedPlugin

File

tests/src/Unit/Plugin/Plugin/PluginSelector/PluginSelectorBaseTest.php, line 144

Class

PluginSelectorBaseTest
@coversDefaultClass \Drupal\plugin\Plugin\Plugin\PluginSelector\PluginSelectorBase

Namespace

Drupal\Tests\plugin\Unit\Plugin\Plugin\PluginSelector

Code

public function testGetSelectedPlugin() {
  $this->sut
    ->setSelectablePluginType($this->selectablePluginType);
  $plugin = $this
    ->createMock(PluginInspectionInterface::class);
  $this
    ->assertSame($this->sut, $this->sut
    ->setSelectedPlugin($plugin));
  $this
    ->assertSame($plugin, $this->sut
    ->getSelectedPlugin());
}