public function FormStateDecoratorBaseTest::testPrepareCallback in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php \Drupal\Tests\Core\Form\FormStateDecoratorBaseTest::testPrepareCallback()
@covers ::prepareCallback
@dataProvider providerPrepareCallback
Parameters
string|callable $unprepared_callback:
callable $prepared_callback:
File
- core/
tests/ Drupal/ Tests/ Core/ Form/ FormStateDecoratorBaseTest.php, line 1443
Class
- FormStateDecoratorBaseTest
- @coversDefaultClass \Drupal\Core\Form\FormStateDecoratorBase
Namespace
Drupal\Tests\Core\FormCode
public function testPrepareCallback($unprepared_callback, callable $prepared_callback) {
$this->decoratedFormState
->prepareCallback(Argument::is($unprepared_callback))
->willReturn($prepared_callback)
->shouldBeCalled();
$this
->assertSame($prepared_callback, $this->formStateDecoratorBase
->prepareCallback($unprepared_callback));
}