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:
@@ -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
|
||||
|
Reference in New Issue
Block a user