function UnknownPathExcluderTest::providerTestUnknownPath

Same name and namespace in other branches
  1. 11.x core/modules/package_manager/tests/src/Kernel/PathExcluder/UnknownPathExcluderTest.php \Drupal\Tests\package_manager\Kernel\PathExcluder\UnknownPathExcluderTest::providerTestUnknownPath()

Data provider for testUnknownPath().

Return value

mixed[][] The test cases.

File

core/modules/package_manager/tests/src/Kernel/PathExcluder/UnknownPathExcluderTest.php, line 97

Class

UnknownPathExcluderTest
Tests Unknown Path Excluder.

Namespace

Drupal\Tests\package_manager\Kernel\PathExcluder

Code

public static function providerTestUnknownPath() {
  return [
    'unknown file where web and project root same' => [
      FALSE,
      NULL,
      [
        'unknown_file.txt',
      ],
    ],
    'unknown file where web and project root different' => [
      TRUE,
      NULL,
      [
        'unknown_file.txt',
      ],
    ],
    'unknown hidden file where web and project root same' => [
      FALSE,
      NULL,
      [
        '.unknown_file',
      ],
    ],
    'unknown hidden file where web and project root different' => [
      TRUE,
      NULL,
      [
        '.unknown_file',
      ],
    ],
    'unknown directory where web and project root same' => [
      FALSE,
      'unknown_dir',
      [
        'unknown_dir/unknown_dir.README.md',
        'unknown_dir/unknown_file.txt',
      ],
    ],
    'unknown directory where web and project root different' => [
      TRUE,
      'unknown_dir',
      [
        'unknown_dir/unknown_dir.README.md',
        'unknown_dir/unknown_file.txt',
      ],
    ],
    'unknown hidden directory where web and project root same' => [
      FALSE,
      '.unknown_dir',
      [
        '.unknown_dir/unknown_dir.README.md',
        '.unknown_dir/unknown_file.txt',
      ],
    ],
    'unknown hidden directory where web and project root different' => [
      TRUE,
      '.unknown_dir',
      [
        '.unknown_dir/unknown_dir.README.md',
        '.unknown_dir/unknown_file.txt',
      ],
    ],
  ];
}

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