diff options
author | Joas Schilling <coding@schilljs.com> | 2025-05-02 14:00:10 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2025-05-02 16:47:42 +0200 |
commit | c24f5fb256f53836727d3479e0fcf79d680ca2ca (patch) | |
tree | 97e2ee14c40ed1cf2237eacd26f69375235e8419 /tests/lib/Files/Storage/Wrapper | |
parent | 9a16e4fd1407f0490136f6cfeec184be4b219dce (diff) | |
download | nextcloud-server-test/noid/more-phpunit-10.tar.gz nextcloud-server-test/noid/more-phpunit-10.zip |
test: Finish migrating tests/Core/ to PHPUnit 10 compatible codetest/noid/more-phpunit-10
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests/lib/Files/Storage/Wrapper')
-rw-r--r-- | tests/lib/Files/Storage/Wrapper/AvailabilityTest.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/lib/Files/Storage/Wrapper/AvailabilityTest.php b/tests/lib/Files/Storage/Wrapper/AvailabilityTest.php index 616fd023414..29277772358 100644 --- a/tests/lib/Files/Storage/Wrapper/AvailabilityTest.php +++ b/tests/lib/Files/Storage/Wrapper/AvailabilityTest.php @@ -76,12 +76,16 @@ class AvailabilityTest extends \Test\TestCase { $this->storage->expects($this->once()) ->method('test') ->willReturn(true); + $calls = [ + false, // prevents concurrent rechecks + true, // sets correct availability + ]; $this->storage->expects($this->exactly(2)) ->method('setAvailability') - ->withConsecutive( - [$this->equalTo(false)], // prevents concurrent rechecks - [$this->equalTo(true)] // sets correct availability - ); + ->willReturnCallback(function ($value) use (&$calls) { + $expected = array_shift($calls); + $this->assertEquals($expected, $value); + }); $this->storage->expects($this->once()) ->method('mkdir'); |