function SecurityAdvisoryTest::providerCreateFromArrayInvalidField

Same name and namespace in other branches
  1. 10 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 149

Class

SecurityAdvisoryTest
@coversDefaultClass <a href="/api/drupal/core%21modules%21system%21src%21SecurityAdvisories%21SecurityAdvisory.php/class/SecurityAdvisory/9" title="Provides a security advisory value object." class="local">\Drupal\system\SecurityAdvisories\SecurityAdvisory</a>

Namespace

Drupal\Tests\system\Unit\SecurityAdvisories

Code

public 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.