diff options
author | Edward Ly <contact@edward.ly> | 2025-03-20 08:53:38 -0700 |
---|---|---|
committer | Edward Ly <contact@edward.ly> | 2025-03-20 11:43:40 -0700 |
commit | eee8b309e651c8647614429cc5f99ddd914a2397 (patch) | |
tree | d23fbab95a01e9fff4d8f71720fad22be8728ee0 /tests | |
parent | 569b21fdfe659af70aa7f9c23e8def2f96a20c3c (diff) | |
download | nextcloud-server-fix/quota-exceptions.tar.gz nextcloud-server-fix/quota-exceptions.zip |
fix(Quota): throw NotEnoughSpaceException if file quota exceeded for mkdir operationfix/quota-exceptions
Signed-off-by: Edward Ly <contact@edward.ly>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Files/Storage/Wrapper/QuotaTest.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/lib/Files/Storage/Wrapper/QuotaTest.php b/tests/lib/Files/Storage/Wrapper/QuotaTest.php index f07e6021e4e..22703785c47 100644 --- a/tests/lib/Files/Storage/Wrapper/QuotaTest.php +++ b/tests/lib/Files/Storage/Wrapper/QuotaTest.php @@ -10,6 +10,7 @@ namespace Test\Files\Storage\Wrapper; //ensure the constants are loaded use OC\Files\Cache\CacheEntry; use OC\Files\Storage\Local; +use OCP\Files\NotEnoughSpaceException; \OC::$loader->load('\OC\Files\Filesystem'); @@ -211,7 +212,8 @@ class QuotaTest extends \Test\Files\Storage\Storage { public function testNoMkdirQuotaZero(): void { $instance = $this->getLimitedStorage(0.0); $this->assertFalse($instance->mkdir('files')); - $this->assertFalse($instance->mkdir('files/foobar')); + $this->expectException(NotEnoughSpaceException::class); + $instance->mkdir('files/foobar'); } public function testMkdirQuotaZeroTrashbin(): void { |