mirror of
https://github.com/Ne-Lexa/php-zip.git
synced 2025-03-21 06:59:40 +01:00
Skipped some tests for a users with root privileges
This commit is contained in:
parent
129e69c293
commit
1b1495eee8
@ -30,6 +30,10 @@ class ZipFileTest extends ZipTestCase
|
||||
*/
|
||||
public function testOpenFileCantOpen()
|
||||
{
|
||||
if (0 === posix_getuid()){
|
||||
$this->markTestSkipped('Skip the test for a user with root privileges');
|
||||
}
|
||||
|
||||
self::assertNotFalse(file_put_contents($this->outputFilename, 'content'));
|
||||
self::assertTrue(chmod($this->outputFilename, 0222));
|
||||
|
||||
@ -1003,6 +1007,10 @@ class ZipFileTest extends ZipTestCase
|
||||
*/
|
||||
public function testExtractFail3()
|
||||
{
|
||||
if (0 === posix_getuid()){
|
||||
$this->markTestSkipped('Skip the test for a user with root privileges');
|
||||
}
|
||||
|
||||
$zipFile = new ZipFile();
|
||||
$zipFile['file'] = 'content';
|
||||
$zipFile->saveAsFile($this->outputFilename);
|
||||
@ -1205,6 +1213,10 @@ class ZipFileTest extends ZipTestCase
|
||||
*/
|
||||
public function testAddFileCantOpen()
|
||||
{
|
||||
if (0 === posix_getuid()){
|
||||
$this->markTestSkipped('Skip the test for a user with root privileges');
|
||||
}
|
||||
|
||||
self::assertNotFalse(file_put_contents($this->outputFilename, ''));
|
||||
self::assertTrue(chmod($this->outputFilename, 0244));
|
||||
|
||||
@ -1489,6 +1501,10 @@ class ZipFileTest extends ZipTestCase
|
||||
*/
|
||||
public function testSaveAsFileNotWritable()
|
||||
{
|
||||
if (0 === posix_getuid()){
|
||||
$this->markTestSkipped('Skip the test for a user with root privileges');
|
||||
}
|
||||
|
||||
self::assertTrue(mkdir($this->outputDirname, 0444, true));
|
||||
self::assertTrue(chmod($this->outputDirname, 0444));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user