function SqliteDatabaseExcluderTest::providerSqliteDatabaseFilesExcluded
Data provider for ::testSqliteDatabaseFilesExcluded().
Return value
array[] The test cases.
File
-
core/
modules/ package_manager/ tests/ src/ Kernel/ PathExcluder/ SqliteDatabaseExcluderTest.php, line 53
Class
- SqliteDatabaseExcluderTest
- @covers \Drupal\package_manager\PathExcluder\SqliteDatabaseExcluder @group package_manager @internal
Namespace
Drupal\Tests\package_manager\Kernel\PathExcluderCode
public static function providerSqliteDatabaseFilesExcluded() : array {
return [
// If the database is at a relative path, it should be excluded relative
// to the web root.
'relative path in relocated web root' => [
'www',
'db.sqlite',
'www/db.sqlite',
],
'relative path, web root is project root' => [
'',
'db.sqlite',
'db.sqlite',
],
// If the database is at an absolute path in the project root, it should
// be excluded relative to the project root.
'absolute path in relocated web root' => [
'www',
'<PROJECT_ROOT>/www/db.sqlite',
'www/db.sqlite',
],
'absolute path, web root is project root' => [
'',
'<PROJECT_ROOT>/db.sqlite',
'db.sqlite',
],
// If the database is outside the project root, the excluder doesn't need
// to do anything.
'absolute path outside of project, relocated web root' => [
'www',
'/path/to/database.sqlite',
FALSE,
],
'absolute path outside of project, web root is project root' => [
'',
'/path/to/database.sqlite',
FALSE,
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.