You are here

public function UnicodeTest::providerTestStatus in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Component/Utility/UnicodeTest.php \Drupal\Tests\Component\Utility\UnicodeTest::providerTestStatus()

Data provider for testStatus().

Return value

array An array containing:

  • The status value to set.
  • The status value to expect after setting the new value.
  • (optional) Boolean indicating invalid status. Defaults to FALSE.

See also

testStatus()

File

core/tests/Drupal/Tests/Component/Utility/UnicodeTest.php, line 58
Contains \Drupal\Tests\Component\Utility\UnicodeTest.

Class

UnicodeTest
Test unicode handling features implemented in Unicode component.

Namespace

Drupal\Tests\Component\Utility

Code

public function providerTestStatus() {
  return array(
    array(
      Unicode::STATUS_SINGLEBYTE,
      Unicode::STATUS_SINGLEBYTE,
    ),
    array(
      rand(10, 100),
      Unicode::STATUS_SINGLEBYTE,
      TRUE,
    ),
    array(
      rand(10, 100),
      Unicode::STATUS_SINGLEBYTE,
      TRUE,
    ),
    array(
      Unicode::STATUS_MULTIBYTE,
      Unicode::STATUS_MULTIBYTE,
    ),
    array(
      rand(10, 100),
      Unicode::STATUS_MULTIBYTE,
      TRUE,
    ),
    array(
      Unicode::STATUS_ERROR,
      Unicode::STATUS_ERROR,
    ),
    array(
      Unicode::STATUS_MULTIBYTE,
      Unicode::STATUS_MULTIBYTE,
    ),
  );
}