Skip to content

Commit 7614ad7

Browse files
committed
Fix unit test to pass on Windows
1 parent b84f3e4 commit 7614ad7

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/Cas/Ticket/FileSystemTicketStore.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,6 @@ private function validateTicketPath(string $ticketId): string
133133

134134
// Store tickets as hashed filenames inside the ticket directory.
135135
// (Avoids issues with special chars / very long filenames.)
136-
return $baseDir . '/' . sha1($ticketId);
136+
return $baseDir . DIRECTORY_SEPARATOR . sha1($ticketId);
137137
}
138138
}

‎tests/src/Ticket/FileSystemTicketStoreTest.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function testPathTraversalCannotReadOrUnserializeOutsideTicketDirectory()
4747

4848
$this->expectException(Exception::class);
4949
$this->expectExceptionMessage('Invalid ticketId provided.');
50-
$store->getTicket('../' . basename($outsideFile));
50+
$store->getTicket('..' . DIRECTORY_SEPARATOR . basename($outsideFile));
5151
}
5252

5353

0 commit comments

Comments
 (0)