You are here

public function FormElementTest::providerGetMaxDelta in Modules weight 8

Same name and namespace in other branches
  1. 8.2 tests/src/Unit/Utility/FormElementTest.php \Drupal\Tests\modules_weight\Unit\Utility\FormElementTest::providerGetMaxDelta()

Data provider for testGetMaxDelta().

Return value

array An array of arrays, each containing:

See also

testGetMaxDelta()

File

tests/src/Unit/Utility/FormElementTest.php, line 41

Class

FormElementTest
Tests the FormElement class methods.

Namespace

Drupal\Tests\modules_weight\Unit\Utility

Code

public function providerGetMaxDelta() {
  $tests['value higher than 100 - 1'] = [
    101,
    101,
  ];
  $tests['value higher than 100 - 2'] = [
    234,
    234,
  ];
  $tests['value lower than -100 - 1'] = [
    101,
    -101,
  ];
  $tests['value lower than -100 - 2'] = [
    234,
    -234,
  ];
  $tests['value lower than 100 and higher than -100 - 1'] = [
    100,
    35,
  ];
  $tests['value lower than 100 and higher than -100 - 2'] = [
    100,
    33,
  ];
  $tests['value lower than 100 and higher than -100 - 3'] = [
    100,
    -33,
  ];
  $tests['value lower than 100 and higher than -100 - 4'] = [
    100,
    -35,
  ];
  $tests['value equal to 100'] = [
    100,
    100,
  ];
  $tests['value equal to -100'] = [
    100,
    -100,
  ];
  return $tests;
}