You are here

public function JQueryColorpickerTest::providerTestValueCallback 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::providerTestValueCallback()

Data provider for testValueCallback()

File

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

Class

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

Namespace

Drupal\Test\jquery_colorpicker\Element

Code

public function providerTestValueCallback() {
  $data = [];
  $data[] = [
    NULL,
    FALSE,
  ];
  $data[] = [
    NULL,
    NULL,
  ];
  $data[] = [
    '',
    [
      'test',
    ],
  ];
  $test = new \stdClass();
  $test->value = 'test';
  $data[] = [
    '',
    $test,
  ];
  $data[] = [
    "123",
    123,
  ];
  $data[] = [
    "1.23",
    1.23,
  ];
  $data[] = [
    "123",
    "123",
  ];
  $data[] = [
    "1",
    TRUE,
  ];
  return $data;
}