You are here

public function TestBaseTest::providerAssert in Drupal 8

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 156

Class

TestBaseTest
@requires extension curl @coversDefaultClass \Drupal\simpletest\TestBase @group simpletest @group TestBase

Namespace

Drupal\Tests\simpletest\Unit

Code

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