From b035ae6b1c90c10ebe0821ca402d936dba5b57fc 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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/features/bootstrap/WopiContext.php b/tests/features/bootstrap/WopiContext.php index 82bb435480..7b99f7340f 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,8 @@ 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]; + [$current] = explode($this->fileIds[count($this->fileIds) - 1], '_'); + [$previous] = explode($this->fileIds[count($this->fileIds) - 2], '_'); Assert::assertNotEquals($current, $previous); }