public function PdbBlockTest::testBuildConfigurationForm in Decoupled Blocks 8
Tests the buildConfigurationForm() method.
File
- tests/
src/ Unit/ Plugin/ Block/ PdbBlockTest.php, line 350
Class
- PdbBlockTest
- @coversDefaultClass \Drupal\pdb\Plugin\Block\PdbBlock @group pdb
Namespace
Drupal\Tests\pdb\Unit\Plugin\BlockCode
public function testBuildConfigurationForm() {
$form_state = $this
->createMock(FormStateInterface::CLASS);
$return = $this->plugin
->buildConfigurationForm([], $form_state);
$this
->assertEquals('test', $return['pdb_configuration']['testField']['#default_value']);
$this
->assertEquals('<p>Formatted text</p>', $return['pdb_configuration']['formatted_field']['#default_value']);
}