function InputTest::testDefaultValueFromConfig
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Recipe/ InputTest.php, line 61
Class
- InputTest
- @group Recipe @covers \Drupal\Core\Recipe\InputConfigurator
Namespace
Drupal\KernelTests\Core\RecipeCode
public function testDefaultValueFromConfig() : void {
// Collect the input values before processing the recipe, using a mocked
// collector that will always return the default value.
$collector = $this->createMock(InputCollectorInterface::class);
$collector->expects($this->any())
->method('collectValue')
->withAnyParameters()
->willReturnArgument(2);
$this->recipe->input
->collectAll($collector);
RecipeRunner::processRecipe($this->recipe);
$this->assertSame([
'ben@deep.space',
], ContactForm::load('feedback')?->getRecipients());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.