function SecurityAdvisoryTest::providerCreateFromArrayInvalidField

Same name in other branches
  1. 9 core/modules/system/tests/src/Unit/SecurityAdvisories/SecurityAdvisoryTest.php \Drupal\Tests\system\Unit\SecurityAdvisories\SecurityAdvisoryTest::providerCreateFromArrayInvalidField()
  2. 11.x core/modules/system/tests/src/Unit/SecurityAdvisories/SecurityAdvisoryTest.php \Drupal\Tests\system\Unit\SecurityAdvisories\SecurityAdvisoryTest::providerCreateFromArrayInvalidField()

Data provider for testCreateFromArrayInvalidField().

File

core/modules/system/tests/src/Unit/SecurityAdvisories/SecurityAdvisoryTest.php, line 151

Class

SecurityAdvisoryTest
@coversDefaultClass \Drupal\system\SecurityAdvisories\SecurityAdvisory

Namespace

Drupal\Tests\system\Unit\SecurityAdvisories

Code

public static function providerCreateFromArrayInvalidField() : array {
    return [
        'title' => [
            'title',
            'This value should be of type string.',
        ],
        'link' => [
            'link',
            'This value should be of type string.',
        ],
        'project' => [
            'project',
            'This value should be of type string.',
        ],
        'type' => [
            'type',
            'This value should be of type string.',
        ],
        'is_psa' => [
            'is_psa',
            'The value you selected is not a valid choice.',
        ],
        'insecure' => [
            'insecure',
            'This value should be of type array.',
        ],
    ];
}

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