Skip to content

Commit

Permalink
make code compatible with both 7.4 & 8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasVHG committed Jan 25, 2024
1 parent a009429 commit aa92322
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions .phpunit.result.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"version":1,"defects":{"CultuurNet\\SearchV3\\ValueObjects\\FacetResultsTest::testGetFacetResultsMethod":3,"CultuurNet\\SearchV3\\ValueObjects\\FacetResultsTest::testGetFacetResultsByFieldMethod":3},"times":{"CultuurNet\\SearchV3\\Parameter\\AddressCountryTest::testConstructor":0.004,"CultuurNet\\SearchV3\\Parameter\\AudienceTypeTest::testConstructor":0,"CultuurNet\\SearchV3\\Parameter\\AvailableFromTest::testConstructor":0,"CultuurNet\\SearchV3\\Parameter\\AvailableFromTest::testFactoryMethodWithAtomString":0,"CultuurNet\\SearchV3\\Parameter\\AvailableFromTest::testWithWildcard":0,"CultuurNet\\SearchV3\\Parameter\\AvailableToTest::testConstructor":0,"CultuurNet\\SearchV3\\Parameter\\AvailableToTest::testFactoryMethodWithAtomString":0,"CultuurNet\\SearchV3\\Parameter\\AvailableToTest::testWithWildcard":0,"CultuurNet\\SearchV3\\Parameter\\CalendarTypeTest::testConstructor":0,"CultuurNet\\SearchV3\\Parameter\\CoordinatesTest::testConstructor":0,"CultuurNet\\SearchV3\\Parameter\\CreatedFromTest::testConstructor":0,"CultuurNet\\SearchV3\\Parameter\\CreatedFromTest::testFactoryMethodWithAtomString":0,"CultuurNet\\SearchV3\\Parameter\\CreatedFromTest::testWithWildcard":0,"CultuurNet\\SearchV3\\Parameter\\CreatedToTest::testConstructor":0,"CultuurNet\\SearchV3\\Parameter\\CreatedToTest::testFactoryMethodWithAtomString":0,"CultuurNet\\SearchV3\\Parameter\\CreatedToTest::testWithWildcard":0,"CultuurNet\\SearchV3\\Parameter\\CreatorTest::testConstructor":0,"CultuurNet\\SearchV3\\Parameter\\DateFromTest::testConstructor":0,"CultuurNet\\SearchV3\\Parameter\\DateFromTest::testFactoryMethodWithAtomString":0,"CultuurNet\\SearchV3\\Parameter\\DateFromTest::testWithWildcard":0,"CultuurNet\\SearchV3\\Parameter\\DateToTest::testConstructor":0,"CultuurNet\\SearchV3\\Parameter\\DateToTest::testFactoryMethodWithAtomString":0,"CultuurNet\\SearchV3\\Parameter\\DateToTest::testWithWildcard":0,"CultuurNet\\SearchV3\\Parameter\\DistanceTest::testConstructor":0,"CultuurNet\\SearchV3\\Parameter\\DistanceTest::testConstructorWithWrongUnit":0.001,"CultuurNet\\SearchV3\\Parameter\\EmbedUitpasPricesTest::testConstructor":0,"CultuurNet\\SearchV3\\Parameter\\FacetTest::testConstructor":0,"CultuurNet\\SearchV3\\Parameter\\IdTest::testConstructor":0,"CultuurNet\\SearchV3\\Parameter\\LabelsTest::testConstructor":0,"CultuurNet\\SearchV3\\Parameter\\LanguagesTest::testConstructor":0,"CultuurNet\\SearchV3\\Parameter\\LanguagesTest::testConstructorWithWrongLanguage":0,"CultuurNet\\SearchV3\\Parameter\\LocationIdTest::testConstructor":0,"CultuurNet\\SearchV3\\Parameter\\MaxAgeTest::testConstructor":0,"CultuurNet\\SearchV3\\Parameter\\MaxPriceTest::testConstructor":0,"CultuurNet\\SearchV3\\Parameter\\MediaObjectTest::testConstructor":0.001,"CultuurNet\\SearchV3\\Parameter\\MinAgeTest::testConstructor":0,"CultuurNet\\SearchV3\\Parameter\\MinPriceTest::testConstructor":0,"CultuurNet\\SearchV3\\Parameter\\ModifiedFromTest::testConstructor":0,"CultuurNet\\SearchV3\\Parameter\\ModifiedFromTest::testFactoryMethodWithAtomString":0,"CultuurNet\\SearchV3\\Parameter\\ModifiedFromTest::testWithWildcard":0,"CultuurNet\\SearchV3\\Parameter\\ModifiedToTest::testConstructor":0,"CultuurNet\\SearchV3\\Parameter\\ModifiedToTest::testFactoryMethodWithAtomString":0,"CultuurNet\\SearchV3\\Parameter\\ModifiedToTest::testWithWildcard":0,"CultuurNet\\SearchV3\\Parameter\\OrganizerIdTest::testConstructor":0,"CultuurNet\\SearchV3\\Parameter\\PostalCodeTest::testConstructor":0,"CultuurNet\\SearchV3\\Parameter\\PriceTest::testConstructor":0,"CultuurNet\\SearchV3\\Parameter\\QueryTest::testConstructor":0,"CultuurNet\\SearchV3\\Parameter\\RegionsTest::testConstructor":0,"CultuurNet\\SearchV3\\Parameter\\TermIdsTest::testConstructor":0,"CultuurNet\\SearchV3\\Parameter\\TermLabelsTest::testConstructor":0,"CultuurNet\\SearchV3\\Parameter\\UitpasTest::testConstructor":0,"CultuurNet\\SearchV3\\Parameter\\WorkflowStatusTest::testConstructor":0,"CultuurNet\\SearchV3\\SearchClientTest::testSetClient":0.014,"CultuurNet\\SearchV3\\SearchClientTest::testSearchEventsMethod":0.007,"CultuurNet\\SearchV3\\SearchClientTest::testSearchPlacesMethod":0,"CultuurNet\\SearchV3\\SearchClientTest::testSearchOfferMethod":0,"CultuurNet\\SearchV3\\SearchQueryTest::testConstructor":0.001,"CultuurNet\\SearchV3\\SearchQueryTest::testAddParameterMethod":0,"CultuurNet\\SearchV3\\SearchQueryTest::testRemoveParametersMethod":0,"CultuurNet\\SearchV3\\SearchQueryTest::testGetParametersMethod":0,"CultuurNet\\SearchV3\\SearchQueryTest::testAddSortMethod":0,"CultuurNet\\SearchV3\\SearchQueryTest::testRemoveSortMethod":0,"CultuurNet\\SearchV3\\SearchQueryTest::testGetSortMethod":0,"CultuurNet\\SearchV3\\SearchQueryTest::testToArrayMethod":0,"CultuurNet\\SearchV3\\SearchQueryTest::testToArrayMethodWithDuplicateParameterKeys":0,"CultuurNet\\SearchV3\\SearchQueryTest::testToArrayMethodWithDuplicateFacetKeys":0,"CultuurNet\\SearchV3\\SearchQueryTest::testToArrayMethodWithOneAdvancedQuery":0,"CultuurNet\\SearchV3\\SearchQueryTest::testToArrayMethodWithMultipleAdvancedQueries":0,"CultuurNet\\SearchV3\\SearchQueryTest::testToStringMethod":0,"CultuurNet\\SearchV3\\SearchQueryTest::testAddEmbedUitpasPricesParameter":0,"CultuurNet\\SearchV3\\Serializer\\SerializerTest::testSerializeMethod":0.029,"CultuurNet\\SearchV3\\Serializer\\SerializerTest::testDeserializeMethodForResultsWithoutEmbed":0.008,"CultuurNet\\SearchV3\\Serializer\\SerializerTest::testDeserializeMethodForResultWithObsoleteCalendarSummaryFormat":0.003,"CultuurNet\\SearchV3\\Serializer\\SerializerTest::testDeserializeMethodForResultsWithEmbedAndFacets":0.008,"CultuurNet\\SearchV3\\ValueObjects\\AddressTest::testGetAddressCountryMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\AddressTest::testGetAddressLocalityMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\AddressTest::testGetPostalCodeMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\AddressTest::testGetStreetAddressMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\BookingInfoTest::testGetPhoneMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\BookingInfoTest::testGetEmailMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\BookingInfoTest::testGetUrlMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\BookingInfoTest::testGetUrlLabelMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\CalendarSummaryFormatTest::it_throws_on_unsupported_type":0,"CultuurNet\\SearchV3\\ValueObjects\\CalendarSummaryFormatTest::it_throws_on_unsupported_size":0,"CultuurNet\\SearchV3\\ValueObjects\\CalendarSummaryLanguageTest::it_throws_on_unsupported_language":0,"CultuurNet\\SearchV3\\ValueObjects\\CalendarSummaryTest::it_returns_summaries_by_language_and_type_and_format":0,"CultuurNet\\SearchV3\\ValueObjects\\CalendarSummaryTest::it_throws_when_language_is_not_provided":0,"CultuurNet\\SearchV3\\ValueObjects\\CalendarSummaryTest::it_throws_when_type_is_not_provided":0,"CultuurNet\\SearchV3\\ValueObjects\\CalendarSummaryTest::it_throws_when_format_is_not_provided":0,"CultuurNet\\SearchV3\\ValueObjects\\CollectionTest::testGetItemsMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\ContactPointTest::testGetEmailsMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\ContactPointTest::testGetPhoneNumbersMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\ContactPointTest::testGetUrlsMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\EventTest::testNameGettersAndSetters":0,"CultuurNet\\SearchV3\\ValueObjects\\EventTest::testGetLocationMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\EventTest::testGetSubEventsMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\EventTest::testGetPriceInfoMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\EventTest::testGetBookingInfoMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\FacetResultItemTest::testGetValueMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\FacetResultItemTest::testGetNamesMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\FacetResultItemTest::testGetCountMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\FacetResultItemTest::testGetChildrenMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\FacetResultTest::testGetFieldMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\FacetResultTest::testGetResultsMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\FacetResultsTest::testGetFacetResultsMethod":0.001,"CultuurNet\\SearchV3\\ValueObjects\\FacetResultsTest::testGetFacetResultsByFieldMethod":0.001,"CultuurNet\\SearchV3\\ValueObjects\\GeoPointTest::testGetLatitudeMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\GeoPointTest::testGetLongitudeMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\MediaObjectTest::testGetIdMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\MediaObjectTest::testGetContentUrlMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\MediaObjectTest::testGetThumbnailUrlMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\MediaObjectTest::testGetDescriptionMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\MediaObjectTest::testGetCopyrightHolderMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\OpeningHoursTest::testGetDayOfWeekMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\OpeningHoursTest::testGetOpensMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\OpeningHoursTest::testGetClosesMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\OrganizerTest::testGetIdMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\OrganizerTest::testGetCdbidMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\OrganizerTest::testGetAndSetNameMethods":0,"CultuurNet\\SearchV3\\ValueObjects\\OrganizerTest::testGetEmailMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\OrganizerTest::testGetContactPointMehtod":0,"CultuurNet\\SearchV3\\ValueObjects\\OrganizerTest::testGetHiddenLabelsMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\PagedCollectionTest::testGetItemsPerPageMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\PagedCollectionTest::testGetTotalItems":0,"CultuurNet\\SearchV3\\ValueObjects\\PagedCollectionTest::testGetMemberMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\PagedCollectionTest::testGetFacets":0,"CultuurNet\\SearchV3\\ValueObjects\\PlaceTest::testGetAddressMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\PlaceTest::testGetGeoMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\PlaceTest::testGetIdMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\PlaceTest::testGetCdbidMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\PlaceTest::testGetMainLanguageMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\PlaceTest::testGetNameMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\PlaceTest::testGetDescriptionMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\PlaceTest::testGetCalendarTypeMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\PlaceTest::testGetCalendarSummaryMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\PlaceTest::testGetCreatorMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\PlaceTest::testGetCreatedMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\PlaceTest::testGetModifiedMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\PlaceTest::testGetPublisherMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\PlaceTest::testGetTypicalAgeRangeMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\PlaceTest::testGetPerformersMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\PlaceTest::testGetImageMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\PlaceTest::testGetMediaObjectsMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\PlaceTest::testGetMainMediaObjectMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\PlaceTest::testGetOrganizerMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\PlaceTest::testGetLabelsMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\PlaceTest::testGetHiddenLabelsMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\PlaceTest::testGetStartDateMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\PlaceTest::testGetEndDateMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\PlaceTest::testGetTermsMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\PlaceTest::testGetTermsByDomainMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\PlaceTest::testGetContactPointMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\PlaceTest::testGetOpeningHoursMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\PriceInfoTest::testGetCategoryMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\PriceInfoTest::testGetNameMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\PriceInfoTest::testGetPriceCurrency":0,"CultuurNet\\SearchV3\\ValueObjects\\PriceInfoTest::testGetPriceMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\TermTest::testGetIdMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\TermTest::testGetLabelMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\TermTest::testGetDomainMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\TranslatedAddressTest::testGetAddressesMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\TranslatedAddressTest::testGetAddressForLanguageMethod":0,"CultuurNet\\SearchV3\\ValueObjects\\TranslatedAddressTest::testDeserializeAddress":0,"CultuurNet\\SearchV3\\ValueObjects\\TranslatedStringTest::testGetValueForLanguage":0,"CultuurNet\\SearchV3\\ValueObjects\\TranslatedStringTest::testGettersAndSetters":0,"CultuurNet\\SearchV3\\ValueObjects\\TranslatedStringTest::testDeserializeMethod":0}}
4 changes: 3 additions & 1 deletion test/ValueObjects/FacetResultsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace CultuurNet\SearchV3\ValueObjects;

use CultuurNet\SearchV3\Serializer\Serializer;
use PHPUnit\Framework\TestCase;

final class FacetResultsTest extends TestCase
Expand All @@ -18,7 +19,8 @@ final class FacetResultsTest extends TestCase
public function setUp(): void
{
$this->facetJson = file_get_contents(__DIR__ . '/data/facetResults.json');
$this->facetResults = new FacetResults();
$serializer = new Serializer();
$this->facetResults = $serializer->deserialize($this->facetJson, FacetResults::class);
}

private function deserializeFacilitiesTestData(array $results): array
Expand Down

0 comments on commit aa92322

Please sign in to comment.