public function PluginSelectorBaseTest::testGetRequired in Plugin 8.2
@covers ::setRequired @covers ::isRequired
File
- tests/
src/ Unit/ Plugin/ Plugin/ PluginSelector/ PluginSelectorBaseTest.php, line 155
Class
- PluginSelectorBaseTest
- @coversDefaultClass \Drupal\plugin\Plugin\Plugin\PluginSelector\PluginSelectorBase
Namespace
Drupal\Tests\plugin\Unit\Plugin\Plugin\PluginSelectorCode
public function testGetRequired() {
$this
->assertFalse($this->sut
->isRequired());
$this
->assertSame($this->sut, $this->sut
->setRequired());
$this
->assertTrue($this->sut
->isRequired());
$this->sut
->setRequired(FALSE);
$this
->assertFalse($this->sut
->isRequired());
}