yield ['~/../css/style.css', '/home/css/style.css'
];
yield ['~/./../css/style.css', '/home/css/style.css'
];
yield ['~/.././css/style.css', '/home/css/style.css'
];
yield ['~/../../css/style.css', '/css/style.css'
];
} /**
* @dataProvider provideCanonicalizationTests
*/
public function testCanonicalize(string
$path, string
$canonicalized) { $this->
assertSame($canonicalized, Path::
canonicalize($path));
} public static function provideGetDirectoryTests(): \Generator
{ yield ['/webmozart/symfony/style.css', '/webmozart/symfony'
];
yield ['/webmozart/symfony', '/webmozart'
];
yield ['/webmozart', '/'
];
yield ['/', '/'
];
yield ['', ''
];
yield ['\\webmozart\\symfony\\style.css', '/webmozart/symfony'
];