L\'Oxalys Val Thorens F Rue des Lacs Hotel True '; $filesystem = $this->createMock(FilesystemOperator::class); $filesystem->expects(self::once()) ->method('read') ->with('hotel.xml') ->willReturn($xmlContent); $cache = new ArrayAdapter(); $loader = new HotelLoader($cache, $filesystem); $hotels = $loader->loadAll(); self::assertIsArray($hotels); self::assertArrayHasKey(163113, $hotels); $hotel = $hotels[163113]; self::assertInstanceOf(Hotel::class, $hotel); self::assertEquals(163113, $hotel->id); self::assertEquals('L\'Oxalys', $hotel->name); self::assertEquals('SBWOXA', $hotel->code); self::assertEquals('Val Thorens', $hotel->city); self::assertEquals('F', $hotel->country); self::assertEquals('Rue des Lacs', $hotel->street); self::assertEquals('', $hotel->phone); } }