public function DrupalComponentTest::providerAssertNoCoreUsage in Drupal 9
Data provider for testAssertNoCoreUsage().
Return value
array Data for testAssertNoCoreUsage() in the form:
- TRUE if the test passes, FALSE otherwise.
- File data as a string. This will be used as a virtual file.
File
- core/
tests/ Drupal/ Tests/ Component/ DrupalComponentTest.php, line 112
Class
- DrupalComponentTest
- General tests for \Drupal\Component that can't go anywhere else.
Namespace
Drupal\Tests\ComponentCode
public function providerAssertNoCoreUsage() {
return [
[
TRUE,
'@see \\Drupal\\Core\\Something',
],
[
FALSE,
'\\Drupal\\Core\\Something',
],
[
FALSE,
"@see \\Drupal\\Core\\Something\n" . '\\Drupal\\Core\\Something',
],
[
FALSE,
"\\Drupal\\Core\\Something\n" . '@see \\Drupal\\Core\\Something',
],
];
}