From f41b8448c5a2093b3addc54c17c5756ba78d8898 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Mon, 19 Dec 2022 15:18:53 +0100 Subject: [PATCH] Extend test cases for parking facility sorting (#101) --- .../Unit/Domain/Model/Frontend/TouristAttractionTest.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Tests/Unit/Domain/Model/Frontend/TouristAttractionTest.php b/Tests/Unit/Domain/Model/Frontend/TouristAttractionTest.php index a9362eb..bb6c9cc 100644 --- a/Tests/Unit/Domain/Model/Frontend/TouristAttractionTest.php +++ b/Tests/Unit/Domain/Model/Frontend/TouristAttractionTest.php @@ -42,6 +42,10 @@ class TouristAttractionTest extends TestCase $unsortedFacilities->attach($this->parkingFacilityWithTitle('P+R Anlage Zoopark')); $unsortedFacilities->attach($this->parkingFacilityWithTitle('Parkhaus Domplatz')); $unsortedFacilities->attach($this->parkingFacilityWithTitle('007 Parking')); + $unsortedFacilities->attach($this->parkingFacilityWithTitle('Parkplatz Forum 4')); + $unsortedFacilities->attach($this->parkingFacilityWithTitle('Parkplatz Forum 2/3')); + $unsortedFacilities->attach($this->parkingFacilityWithTitle('Parkplatz Forum 1')); + $unsortedFacilities->attach($this->parkingFacilityWithTitle('Parkplatz Forum 2')); $subject = new TouristAttraction(); $subject->_setProperty('parkingFacilityNearBy', $unsortedFacilities); @@ -50,6 +54,10 @@ class TouristAttractionTest extends TestCase self::assertSame('007 Parking', $result[0]->getTitle()); self::assertSame('P+R Anlage Zoopark', $result[1]->getTitle()); self::assertSame('Parkhaus Domplatz', $result[2]->getTitle()); + self::assertSame('Parkplatz Forum 1', $result[3]->getTitle()); + self::assertSame('Parkplatz Forum 2', $result[4]->getTitle()); + self::assertSame('Parkplatz Forum 2/3', $result[5]->getTitle()); + self::assertSame('Parkplatz Forum 4', $result[6]->getTitle()); } private function parkingFacilityWithTitle(string $title): ParkingFacility