14 use PHPUnit\Framework\TestCase;
32 $this->{method_exists($this, $_ =
'expectException') ? $_ :
'setExpectedException'}(
'Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException');
56 $this->{method_exists($this, $_ =
'expectException') ? $_ :
'setExpectedException'}(
'Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException');
62 if (
'\\' === DIRECTORY_SEPARATOR) {
63 $this->markTestSkipped(
'Can not verify chmod operations on Windows');
66 if (!getenv(
'USER') ||
'root' === getenv(
'USER')) {
67 $this->markTestSkipped(
'This test will fail if run under superuser');
70 $path = __DIR__.
'/../Fixtures/to_delete';
74 if (substr(sprintf(
'%o', fileperms(
$path)), -4) ==
'0333') {
75 $this->{method_exists($this, $_ =
'expectException') ? $_ :
'setExpectedException'}(
'Symfony\Component\HttpFoundation\File\Exception\AccessDeniedException');
78 $this->markTestSkipped(
'Can not verify chmod operations, change of file permissions failed');
84 $path = __DIR__.
'/../Fixtures/to_delete';
85 if (file_exists(
$path)) {