public function FootermapBlockTest::testBlockForm in footermap: a footer site map 8
Asserts the block configuration form.
File
- tests/
src/ Unit/ Plugin/ Block/ FootermapBlockTest.php, line 235
Class
- FootermapBlockTest
- Test footermap block methods.
Namespace
Drupal\Tests\footermap\Unit\Plugin\BlockCode
public function testBlockForm() {
$form_state = new FormState();
$block = $this
->getPlugin();
$block
->setConfigurationValue('footermap_avail_menus', [
'menu1' => 'menu1',
]);
$form = $block
->blockForm([], $form_state);
$this
->assertEquals($form['footermap_avail_menus']['#options'], [
'menu1' => 'menu1',
'menu2' => 'menu2',
]);
$this
->assertArrayHasKey('footermap_recurse_limit', $form);
$this
->assertArrayHasKey('footermap_top_menu', $form);
$this
->assertArrayHasKey('footermap_display_heading', $form);
}