You are here

public function TestBaseTest::providerAssert 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::providerAssert()

Data provider for testAssert().

Return value

array Standard dataProvider array of arrays:

  • Expected result from assert().
  • Expected status stored in TestBase->assertions.
  • Status, passed to assert().
  • Message, passed to assert().
  • Group, passed to assert().
  • Caller, passed to assert().

File

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

Class

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

Namespace

Drupal\Tests\simpletest\Unit

Code

public function providerAssert() {
  return array(
    array(
      TRUE,
      'pass',
      TRUE,
      'Yay pass',
      'test',
      array(),
    ),
    array(
      FALSE,
      'fail',
      FALSE,
      'Boo fail',
      'test',
      array(),
    ),
    array(
      TRUE,
      'pass',
      'pass',
      'Yay pass',
      'test',
      array(),
    ),
    array(
      FALSE,
      'fail',
      'fail',
      'Boo fail',
      'test',
      array(),
    ),
    array(
      FALSE,
      'exception',
      'exception',
      'Boo fail',
      'test',
      array(),
    ),
    array(
      FALSE,
      'debug',
      'debug',
      'Boo fail',
      'test',
      array(),
    ),
  );
}