From 727a9bc7800ee3604ec701f3ea144ffcd0e868ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Wed, 8 May 2024 21:05:04 +0200 Subject: [PATCH] tests: Only assert actual file id and skip instance id MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- tests/features/bootstrap/WopiContext.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/features/bootstrap/WopiContext.php b/tests/features/bootstrap/WopiContext.php index 82bb435480..81215a270d 100644 --- a/tests/features/bootstrap/WopiContext.php +++ b/tests/features/bootstrap/WopiContext.php @@ -247,8 +247,8 @@ public function bothCollaboraFilesUsedTheSameFileId() { if (count($this->fileIds) <= 1) { throw new \Exception('Less than two file ids available for comparison'); } - $current = $this->fileIds[count($this->fileIds) - 1]; - $previous = $this->fileIds[count($this->fileIds) - 2]; + [$current] = explode('_', $this->fileIds[count($this->fileIds) - 1]); + [$previous] = explode('_', $this->fileIds[count($this->fileIds) - 2]); Assert::assertEquals($current, $previous); } @@ -259,8 +259,9 @@ public function bothCollaboraFilesUsedADifferentFileId() { if (count($this->fileIds) <= 1) { throw new \Exception('Less than two file ids available for comparison'); } - $current = $this->fileIds[count($this->fileIds) - 1]; - $previous = $this->fileIds[count($this->fileIds) - 2]; + var_dump($this->fileIds); + [$current] = explode('_', $this->fileIds[count($this->fileIds) - 1]); + [$previous] = explode('_', $this->fileIds[count($this->fileIds) - 2]); Assert::assertNotEquals($current, $previous); }