condition = new AccommodationMutabilityCondition(); } public function testReturnsFalseWhenRoomsMutable(): void { $travel = new Travel(); $travel->roomsMutable = true; $bookingDto = new BookingDto($travel, 1); $result = $this->condition->evaluate($bookingDto, 0, []); $this->assertFalse($result, 'Should return false when rooms are mutable (field should be editable)'); } public function testReturnsTrueWhenRoomsNotMutable(): void { $travel = new Travel(); $travel->roomsMutable = false; $bookingDto = new BookingDto($travel, 1); $result = $this->condition->evaluate($bookingDto, 0, []); $this->assertTrue($result, 'Should return true when rooms are not mutable (field should be static text)'); } public function testDefaultTravelHasMutableRooms(): void { $travel = new Travel(); $bookingDto = new BookingDto($travel, 1); $result = $this->condition->evaluate($bookingDto, 0, []); $this->assertFalse($result, 'Default travel should have mutable rooms'); } public function testGetDependentFieldsReturnsEmptyArray(): void { $result = $this->condition->getDependentFields(); $this->assertIsArray($result); $this->assertEmpty($result); } public function testGetDescriptionReturnsString(): void { $result = $this->condition->getDescription(); $this->assertIsString($result); $this->assertStringContainsString('not mutable', $result); } }