public function PaymentReferenceBaseTest::testValueCallbackWithDefaultValue in Payment 8.2
@covers ::valueCallback
File
- tests/
src/ Unit/ Element/ PaymentReferenceBaseTest.php, line 239
Class
- PaymentReferenceBaseTest
- @coversDefaultClass \Drupal\payment\Element\PaymentReferenceBase
Namespace
Drupal\Tests\payment\Unit\ElementCode
public function testValueCallbackWithDefaultValue() {
$payment_id = mt_rand();
$input = $this
->randomMachineName();
$form_state = $this
->createMock(FormStateInterface::class);
$element = array(
'#default_value' => $payment_id,
);
$element_sut = $this->sut;
$this
->assertSame($payment_id, $element_sut::valueCallback($element, $input, $form_state));
}