function 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 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',
            [],
        ],
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.