function RegexDirectoryIteratorTest::providerTestRegexDirectoryIterator
Same name and namespace in other branches
- 11.x core/tests/Drupal/Tests/Component/FileSystem/RegexDirectoryIteratorTest.php \Drupal\Tests\Component\FileSystem\RegexDirectoryIteratorTest::providerTestRegexDirectoryIterator()
- 10 core/tests/Drupal/Tests/Component/FileSystem/RegexDirectoryIteratorTest.php \Drupal\Tests\Component\FileSystem\RegexDirectoryIteratorTest::providerTestRegexDirectoryIterator()
- 8.9.x core/tests/Drupal/Tests/Component/FileSystem/RegexDirectoryIteratorTest.php \Drupal\Tests\Component\FileSystem\RegexDirectoryIteratorTest::providerTestRegexDirectoryIterator()
Provider for
@dataProvider providerTestRegexDirectoryIterator" class="local">self::testRegexDirectoryIterator().
File
-
core/
tests/ Drupal/ Tests/ Component/ FileSystem/ RegexDirectoryIteratorTest.php, line 34
Class
- RegexDirectoryIteratorTest
- @coversDefaultClass \Drupal\Component\FileSystem\RegexDirectoryIterator[[api-linebreak]] @group FileSystem
Namespace
Drupal\Tests\Component\FileSystemCode
public function providerTestRegexDirectoryIterator() {
return [
[
[
'1.yml' => '',
],
'/\\.yml$/',
[
'1.yml',
],
],
[
[
'1.yml' => '',
'2.yml' => '',
'3.txt' => '',
],
'/\\.yml$/',
[
'1.yml',
'2.yml',
],
],
[
[
'1.yml' => '',
'2.yml' => '',
'3.txt' => '',
],
'/\\.txt/',
[
'3.txt',
],
],
[
[
'1.yml' => '',
// Ensure we don't recurse in directories even if that match the
// regex.
'2.yml' => [
'3.yml' => '',
'4.yml' => '',
],
'3.txt' => '',
],
'/\\.yml$/',
[
'1.yml',
],
],
[
[
'1.yml' => '',
'2.yml' => '',
'3.txt' => '',
],
'/^\\d/',
[
'1.yml',
'2.yml',
'3.txt',
],
],
[
[
'1.yml' => '',
'2.yml' => '',
'3.txt' => '',
],
'/^\\D/',
[],
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.