Add positive test for path verification

This commit is contained in:
Vincent Petry 2015-03-17 18:16:28 +01:00
parent c3ae01d66f
commit e50f13d46b
1 changed files with 26 additions and 0 deletions

View File

@ -230,4 +230,30 @@ class PathVerification extends \Test\TestCase {
];
}
/**
* @dataProvider providesValidPosixPaths
*/
public function testPathVerificationValidPaths($fileName) {
$storage = new Local(['datadir' => '']);
\Test_Helper::invokePrivate($storage, 'verifyPosixPath', [$fileName]);
\Test_Helper::invokePrivate($storage, 'verifyWindowsPath', [$fileName]);
// nothing thrown
$this->assertTrue(true);
}
public function providesValidPosixPaths() {
return [
['simple'],
['simple.txt'],
['\''],
['`'],
['%'],
['()'],
['[]'],
['!'],
['$'],
['_'],
];
}
}