summaryrefslogtreecommitdiffstats
path: root/tests/lib
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2023-01-23 10:55:31 +0100
committerCôme Chilliet <come.chilliet@nextcloud.com>2023-02-07 11:23:29 +0100
commit94ecae4ade0b618c024708b747ee7da8b0fb7113 (patch)
tree7696ec87b3c201ede05403eb4878d4a680048954 /tests/lib
parent0f8c34cdc65046d68339127849724ea6383aa4a8 (diff)
downloadnextcloud-server-94ecae4ade0b618c024708b747ee7da8b0fb7113.tar.gz
nextcloud-server-94ecae4ade0b618c024708b747ee7da8b0fb7113.zip
Add helper to cast to int|float, fix MemoryInfo on 32bits
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'tests/lib')
-rw-r--r--tests/lib/MemoryInfoTest.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/lib/MemoryInfoTest.php b/tests/lib/MemoryInfoTest.php
index f6557eed45c..1a983f19ece 100644
--- a/tests/lib/MemoryInfoTest.php
+++ b/tests/lib/MemoryInfoTest.php
@@ -71,10 +71,10 @@ class MemoryInfoTest extends TestCase {
* Tests that getMemoryLimit works as expected.
*
* @param string $iniValue The "memory_limit" ini data.
- * @param int $expected The expected detected memory limit.
+ * @param int|float $expected The expected detected memory limit.
* @dataProvider getMemoryLimitTestData
*/
- public function testMemoryLimit($iniValue, int $expected) {
+ public function testMemoryLimit(string $iniValue, int|float $expected) {
ini_set('memory_limit', $iniValue);
$memoryInfo = new MemoryInfo();
self::assertEquals($expected, $memoryInfo->getMemoryLimit());