function SecurityAdvisoryTest::providerCreateFromArray
Same name in other branches
- 9 core/modules/system/tests/src/Unit/SecurityAdvisories/SecurityAdvisoryTest.php \Drupal\Tests\system\Unit\SecurityAdvisories\SecurityAdvisoryTest::providerCreateFromArray()
- 11.x core/modules/system/tests/src/Unit/SecurityAdvisories/SecurityAdvisoryTest.php \Drupal\Tests\system\Unit\SecurityAdvisories\SecurityAdvisoryTest::providerCreateFromArray()
Data provider for testCreateFromArray().
File
-
core/
modules/ system/ tests/ src/ Unit/ SecurityAdvisories/ SecurityAdvisoryTest.php, line 50
Class
- SecurityAdvisoryTest
- @coversDefaultClass \Drupal\system\SecurityAdvisories\SecurityAdvisory
Namespace
Drupal\Tests\system\Unit\SecurityAdvisoriesCode
public static function providerCreateFromArray() : array {
return [
// For 'is_psa' the return value should converted to any array.
[
[
'is_psa' => 1,
],
[
'is_psa' => TRUE,
],
],
[
[
'is_psa' => '1',
],
[
'is_psa' => TRUE,
],
],
[
[
'is_psa' => TRUE,
],
[
'is_psa' => TRUE,
],
],
[
[
'is_psa' => 0,
],
[
'is_psa' => FALSE,
],
],
[
[
'is_psa' => '0',
],
[
'is_psa' => FALSE,
],
],
[
[
'is_psa' => FALSE,
],
[
'is_psa' => FALSE,
],
],
// Test cases that ensure ::isCoreAdvisory only returns TRUE for core.
[
[
'type' => 'module',
],
],
[
[
'type' => 'theme',
],
],
[
[
'type' => 'core',
],
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.