Skip to content

Commit

Permalink
Merge branch '6.0' into 6.1
Browse files Browse the repository at this point in the history
* 6.0:
  Update ComposerPlugin.php
  [Notifier] [OvhCloud] handle invalid receiver
  [Cache] fix collecting cache stats when nesting computations
  [VarDumper] Fix JS to expand / collapse
  [Validator] Fix Email validator logic
  Fix user_identifier support after username has been deprecated in favor of it.
  [Tests] Remove `$this` occurrences in future static data providers
  [PropertyInfo] Fixes constructor extractor for mixed type
  use method_exists() instead of catching reflection exceptions
  • Loading branch information
nicolas-grekas committed Jan 20, 2023
2 parents 8cdca1c + 3d49eec commit b5218eb
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions Tests/PathTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -458,11 +458,30 @@ public function providePathTests(): \Generator
yield ['..', '/webmozart/symfony', '/webmozart'];
}

private static function getPathTests(): \Generator
{
yield from [
// relative to absolute path
['css/style.css', '/webmozart/symfony', '/webmozart/symfony/css/style.css'],
['../css/style.css', '/webmozart/symfony', '/webmozart/css/style.css'],
['../../css/style.css', '/webmozart/symfony', '/css/style.css'],

// relative to root
['css/style.css', '/', '/css/style.css'],
['css/style.css', 'C:', 'C:/css/style.css'],
['css/style.css', 'C:/', 'C:/css/style.css'],

// same sub directories in different base directories
['../../symfony/css/style.css', '/webmozart/css', '/symfony/css/style.css'],

['', '/webmozart/symfony', '/webmozart/symfony'],
['..', '/webmozart/symfony', '/webmozart'],
];
}

public function provideMakeAbsoluteTests(): \Generator
{
foreach ($this->providePathTests() as $set) {
yield $set;
}
yield from static::getPathTests();

// collapse dots
yield ['css/./style.css', '/webmozart/symfony', '/webmozart/symfony/css/style.css'];
Expand Down Expand Up @@ -589,7 +608,7 @@ public function testMakeAbsoluteDoesNotFailIfDifferentRoot(string $basePath, str

public function provideMakeRelativeTests(): \Generator
{
foreach ($this->providePathTests() as $set) {
foreach (static::getPathTests() as $set) {
yield [$set[2], $set[1], $set[0]];
}

Expand Down

0 comments on commit b5218eb

Please sign in to comment.