From d641c2509348b560fe73ed93a65014819dca32f7 Mon Sep 17 00:00:00 2001 From: Tom Levy Date: Mon, 29 Jul 2024 10:50:01 +0000 Subject: [PATCH] Simplify relative path to webapp/public in webapp/tests/* There is no need to repeat the common prefix "webapp/". In fact earlier in the same file it was already using the simpler path. --- .../tests/Unit/Controller/API/ContestControllerAdminTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webapp/tests/Unit/Controller/API/ContestControllerAdminTest.php b/webapp/tests/Unit/Controller/API/ContestControllerAdminTest.php index 5655e97c80..09519b4ca3 100644 --- a/webapp/tests/Unit/Controller/API/ContestControllerAdminTest.php +++ b/webapp/tests/Unit/Controller/API/ContestControllerAdminTest.php @@ -175,7 +175,7 @@ public function testProblemsetManagement(): void self::assertArrayNotHasKey('problemset', $object); // Now upload a problemset - $problemsetFile = __DIR__ . '/../../../../../webapp/public/doc/logos/DOMjudgelogo.pdf'; + $problemsetFile = __DIR__ . '/../../../../public/doc/logos/DOMjudgelogo.pdf'; $problemset = new UploadedFile($problemsetFile, 'DOMjudgelogo.pdf'); $this->verifyApiJsonResponse('POST', $url . '/problemset', 204, $this->apiUser, null, ['problemset' => $problemset]); @@ -199,7 +199,7 @@ public function testProblemsetManagement(): void self::assertEquals(file_get_contents($problemsetFile), $callbackData); // Upload the problemset again, this time using PUT to also test that - $problemsetFile = __DIR__ . '/../../../../../webapp/public/doc/logos/DOMjudgelogo.pdf'; + $problemsetFile = __DIR__ . '/../../../../public/doc/logos/DOMjudgelogo.pdf'; $problemset = new UploadedFile($problemsetFile, 'DOMjudgelogo.pdf'); $this->verifyApiJsonResponse('PUT', $url . '/problemset', 204, $this->apiUser, null, ['problemset' => $problemset]);