1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-01 19:00:20 +02:00

Merge branch '1.x'

This commit is contained in:
Jordi Boggiano
2020-05-21 16:59:46 +02:00
6 changed files with 82 additions and 5 deletions

View File

@@ -13,6 +13,29 @@ namespace Monolog;
class UtilsTest extends \PHPUnit_Framework_TestCase
{
/**
* @param string $expected
* @param string $input
* @dataProvider providePathsToCanonicalize
*/
public function testCanonicalizePath($expected, $input)
{
$this->assertSame($expected, Utils::canonicalizePath($input));
}
public function providePathsToCanonicalize()
{
return array(
array('/foo/bar', '/foo/bar'),
array('file://'.getcwd().'/bla', 'file://bla'),
array(getcwd().'/bla', 'bla'),
array(getcwd().'/./bla', './bla'),
array('file:///foo/bar', 'file:///foo/bar'),
array('any://foo', 'any://foo'),
array('\\\\network\path', '\\\\network\path'),
);
}
/**
* @param int $code
* @param string $msg