From a36d72e9149da1b271ba956cc2be081776a210d8 Mon Sep 17 00:00:00 2001 From: El RIDO Date: Fri, 11 Oct 2024 07:13:20 +0200 Subject: [PATCH] handle potential key cast since we introduced strict types, this test occasionally fails when a ID consisting only of decimal numbers gets generated --- tst/Data/FilesystemTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tst/Data/FilesystemTest.php b/tst/Data/FilesystemTest.php index 76dec363..390cb66d 100644 --- a/tst/Data/FilesystemTest.php +++ b/tst/Data/FilesystemTest.php @@ -162,6 +162,7 @@ class FilesystemTest extends TestCase // check that all 10 pastes were converted after the purge $this->_model->purge(10); foreach ($ids as $dataid => $storagedir) { + $dataid = (string) $dataid; // undue potential key cast, see https://www.php.net/manual/en/language.types.array.php $this->assertFileExists($storagedir . $dataid . '.php', "paste $dataid exists in new format"); $this->assertFileDoesNotExist($storagedir . $dataid, "old format paste $dataid got removed"); $this->assertTrue($this->_model->exists($dataid), "paste $dataid exists");