8000 [Finder] Exclude relative to content root if prefixed `/` by joshtrichards · Pull Request #54752 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Finder] Exclude relative to content root if prefixed / #54752

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: 5.4
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add tests for Finder exclude root absolute
Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
  • Loading branch information
joshtrichards committed May 8, 2024
commit 70e0ac420e151c1d86fa3a227c060fd77c024a60
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public static function getAcceptData()
'foo/bar.tmp',
'test.php',
'toto',
'toto/foo',
'toto/.git',
'foo bar',
'qux',
Expand Down Expand Up @@ -96,12 +97,36 @@ public static function getAcceptData()
'qux_10_2.php',
'qux_12_0.php',
'qux_2_0.php',
];

$foo_absolute_root = [
'.bar',
'.foo',
'.foo/.bar',
'.foo/bar',
'.git',
'test.py',
'test.php',
'toto',
'toto/foo',
'toto/.git',
'foo bar',
'qux',
'qux/baz_100_1.py',
'qux/baz_1_2.py',
'qux_0_1.php',
'qux_1000_1.php',
'qux_1002_0.php',
'qux_10_2.php',
'qux_12_0.php',
'qux_2_0.php',
];

return [
[['foo'], self::toAbsolute($foo)],
[['fo'], self::toAbsolute($fo)],
[['toto/'], self::toAbsolute($toto)],
[['/foo'], self::toAbsolute($foo_absolute_root)],
];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public static function setUpBeforeClass(): void
'foo/bar.tmp',
'test.php',
'toto/',
'toto/foo/',
'toto/.git/',
'foo bar',
'qux_0_1.php',
Expand Down
0