We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 763e34c commit 9309e04Copy full SHA for 9309e04
tests/PhpWordTests/Shared/ZipArchiveTest.php
@@ -53,18 +53,10 @@ public function testCloseException(): void
53
$object = new ZipArchive();
54
$object->open($this->zipFile, ZipArchive::CREATE);
55
$object->addFromString('content/string.txt', 'Test');
56
-
57
- // Lock the file
58
- $resource = fopen($this->zipFile, 'wb');
59
- self::assertNotFalse($resource);
60
- flock($resource, LOCK_EX);
61
62
- // Closing the file should throws an exception
+ // Should not be able to add a directory like this
+ $object->addFile('.', '.');
+ // But error doesn't express itself till close is attempted
63
$object->close();
64
65
- // Unlock the file
66
- flock($resource, LOCK_UN);
67
- fclose($resource);
68
}
69
70
/**
0 commit comments