public function ParserTest::testParsingNotReadableFilesThrowsException in Lockr 7.3
@expectedException \Symfony\Component\Yaml\Exception\ParseException @expectedExceptionMessageRegExp #^File ".+/Fixtures/not_readable.yml" cannot be read\.$#
File
- vendor/
symfony/ yaml/ Tests/ ParserTest.php, line 2096
Class
Namespace
Symfony\Component\Yaml\TestsCode
public function testParsingNotReadableFilesThrowsException() {
if ('\\' === \DIRECTORY_SEPARATOR) {
$this
->markTestSkipped('chmod is not supported on Windows');
}
if (!getenv('USER') || 'root' === getenv('USER')) {
$this
->markTestSkipped('This test will fail if run under superuser');
}
$file = __DIR__ . '/Fixtures/not_readable.yml';
chmod($file, 0200);
$this->parser
->parseFile($file);
}