You are here

public function JQueryColorpickerTest::testValueCallback in Jquery Colorpicker 8

Same name and namespace in other branches
  1. 8.2 tests/src/Unit/Element/JQueryColorpickerTest.php \Drupal\Test\jquery_colorpicker\Element\JQueryColorpickerTest::testValueCallback()

@covers ::valueCallback

@dataProvider providerTestValueCallback

File

tests/src/Unit/Element/JQueryColorpickerTest.php, line 20

Class

JQueryColorpickerTest
@coversDefaultClass \Drupal\jquery_colorpicker\Element\JQueryColorpicker @group jquery_colorpicker

Namespace

Drupal\Test\jquery_colorpicker\Element

Code

public function testValueCallback($expected, $input) {
  $element = [];
  $form_state = $this
    ->prophesize(FormStateInterface::class)
    ->reveal();
  $this
    ->assertSame($expected, JQueryColorpicker::valueCallback($element, $input, $form_state));
}