/** * @covers ::submitConfigurationForm */ public function testSubmitConfigurationFormWithFilter() { $message_text = $this->randomMachineName(); $message_format = $this->randomMachineName(); $this->moduleHandler->expects($this->once())->method('moduleExists')->with('filter')->willReturn(TRUE); $form = array('message' => array('#parents' => array('foo', 'bar', 'message'))); $form_state = $this->getMock(FormStateInterface::class); $form_state->expects($this->atLeastOnce())->method('getValues')->willReturn(array('foo' => array('bar' => array('message' => array('value' => $message_text, 'format' => $message_format))))); $this->sut->submitConfigurationForm($form, $form_state); $this->assertSame($message_text, $this->sut->getMessageText()); $this->assertSame($message_format, $this->sut->getMessageTextFormat()); }
/** * @covers ::submitConfigurationForm */ public function testSubmitConfigurationForm() { $form = []; $form_state = $this->getMock(FormStateInterface::class); $this->sut->submitConfigurationForm($form, $form_state); }