public function UnsetLineItemTest::testSubmitConfigurationForm in Payment 8.2
@covers ::submitConfigurationForm @depends testBuildConfigurationForm
File
- tests/
src/ Unit/ Plugin/ Action/ UnsetLineItemTest.php, line 90
Class
- UnsetLineItemTest
- @coversDefaultClass \Drupal\payment\Plugin\Action\UnsetLineItem
Namespace
Drupal\Tests\payment\Unit\Plugin\ActionCode
public function testSubmitConfigurationForm() {
$name = $this
->randomMachineName();
$form = [];
$form_state = $this
->createMock(FormStateInterface::class);
$form_state
->expects($this
->atLeastOnce())
->method('getValues')
->willReturn(array(
'line_item_name' => $name,
));
$this->sut
->submitConfigurationForm($form, $form_state);
$configuration = $this->sut
->getConfiguration();
$this
->assertSame($name, $configuration['line_item_name']);
}