function ValidationResultTest::providerCreateExceptions

Data provider for test methods that test create exceptions.

Return value

array[] The test cases.

File

core/modules/package_manager/tests/src/Unit/ValidationResultTest.php, line 116

Class

ValidationResultTest
@coversDefaultClass \Drupal\package_manager\ValidationResult @group package_manager @internal

Namespace

Drupal\Tests\package_manager\Unit

Code

public static function providerCreateExceptions() : array {
    return [
        '2 messages, no summary' => [
            [
                t('Something is wrong'),
                t('Something else is also wrong'),
            ],
            'If more than one message is provided, a summary is required.',
        ],
        'no messages' => [
            [],
            'At least one message is required.',
        ],
    ];
}

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