You are here

public function TestBaseTest::providerRandomStringValidate in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/simpletest/tests/src/Unit/TestBaseTest.php \Drupal\Tests\simpletest\Unit\TestBaseTest::providerRandomStringValidate()

Provides data for the random string validation test.

Return value

array

  • The expected result of the validation.
  • The string to validate.

File

core/modules/simpletest/tests/src/Unit/TestBaseTest.php, line 68
Contains \Drupal\Tests\simpletest\Unit\TestBaseTest.

Class

TestBaseTest
@coversDefaultClass \Drupal\simpletest\TestBase @group simpletest

Namespace

Drupal\Tests\simpletest\Unit

Code

public function providerRandomStringValidate() {
  return array(
    array(
      FALSE,
      ' curry paste',
    ),
    array(
      FALSE,
      'curry paste ',
    ),
    array(
      FALSE,
      'curry  paste',
    ),
    array(
      FALSE,
      'curry   paste',
    ),
    array(
      TRUE,
      'curry paste',
    ),
    array(
      TRUE,
      'thai green curry paste',
    ),
    array(
      TRUE,
      '@startswithat',
    ),
    array(
      TRUE,
      'contains@at',
    ),
  );
}