feat: upgrade project to symfony 7.4
This commit is contained in:
@@ -4,9 +4,9 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Tests\BusProNet\XmlParser;
|
||||
|
||||
use App\BusProNet\XmlCrawlerFactory;
|
||||
use App\BusProNet\XmlParser\AgencyParser;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\DomCrawler\Crawler;
|
||||
|
||||
class AgencyParserTest extends TestCase
|
||||
{
|
||||
@@ -41,7 +41,7 @@ class AgencyParserTest extends TestCase
|
||||
</agenturen>
|
||||
</ergebnis>';
|
||||
|
||||
$crawler = new Crawler($xmlContent);
|
||||
$crawler = XmlCrawlerFactory::create($xmlContent);
|
||||
$resultNode = $crawler->filterXPath('//ergebnis');
|
||||
$agencies = $this->parser->parse($resultNode);
|
||||
|
||||
@@ -79,7 +79,7 @@ class AgencyParserTest extends TestCase
|
||||
</agenturen>
|
||||
</ergebnis>';
|
||||
|
||||
$crawler = new Crawler($xmlContent);
|
||||
$crawler = XmlCrawlerFactory::create($xmlContent);
|
||||
$resultNode = $crawler->filterXPath('//ergebnis');
|
||||
$agencies = $this->parser->parse($resultNode);
|
||||
|
||||
@@ -102,7 +102,7 @@ class AgencyParserTest extends TestCase
|
||||
</agenturen>
|
||||
</ergebnis>';
|
||||
|
||||
$crawler = new Crawler($xmlContent);
|
||||
$crawler = XmlCrawlerFactory::create($xmlContent);
|
||||
$resultNode = $crawler->filterXPath('//ergebnis');
|
||||
$agencies = $this->parser->parse($resultNode);
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Tests\BusProNet\XmlParser;
|
||||
|
||||
use App\BusProNet\XmlCrawlerFactory;
|
||||
use App\BusProNet\XmlParser\BookingInsurancesParser;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\DomCrawler\Crawler;
|
||||
|
||||
class BookingInsurancesParserTest extends TestCase
|
||||
{
|
||||
@@ -22,7 +22,7 @@ class BookingInsurancesParserTest extends TestCase
|
||||
</ergebnis>
|
||||
XML;
|
||||
|
||||
$crawler = new Crawler($xml);
|
||||
$crawler = XmlCrawlerFactory::create($xml);
|
||||
$insurancesData = $crawler->filterXPath('//versicherungen/versicherung');
|
||||
|
||||
$parser = new BookingInsurancesParser();
|
||||
@@ -53,7 +53,7 @@ XML;
|
||||
</ergebnis>
|
||||
XML;
|
||||
|
||||
$crawler = new Crawler($xml);
|
||||
$crawler = XmlCrawlerFactory::create($xml);
|
||||
$insurancesData = $crawler->filterXPath('//versicherungen/versicherung');
|
||||
|
||||
$parser = new BookingInsurancesParser();
|
||||
@@ -88,7 +88,7 @@ XML;
|
||||
</ergebnis>
|
||||
XML;
|
||||
|
||||
$crawler = new Crawler($xml);
|
||||
$crawler = XmlCrawlerFactory::create($xml);
|
||||
$insurancesData = $crawler->filterXPath('//versicherungen/versicherung');
|
||||
|
||||
$parser = new BookingInsurancesParser();
|
||||
|
||||
@@ -4,9 +4,9 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Tests\BusProNet\XmlParser;
|
||||
|
||||
use App\BusProNet\XmlCrawlerFactory;
|
||||
use App\BusProNet\XmlParser\BookingResponseParser;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\DomCrawler\Crawler;
|
||||
|
||||
class BookingResponseParserTest extends TestCase
|
||||
{
|
||||
@@ -34,7 +34,7 @@ class BookingResponseParserTest extends TestCase
|
||||
</zahlungsbedingungen>
|
||||
</ergebnis>';
|
||||
|
||||
$crawler = new Crawler($xmlContent);
|
||||
$crawler = XmlCrawlerFactory::create($xmlContent);
|
||||
$response = $this->parser->parse($crawler->filter('ergebnis'));
|
||||
|
||||
$this->assertTrue($response->isInquiryValid());
|
||||
@@ -67,7 +67,7 @@ class BookingResponseParserTest extends TestCase
|
||||
</zahlungsbedingungen>
|
||||
</ergebnis>';
|
||||
|
||||
$crawler = new Crawler($xmlContent);
|
||||
$crawler = XmlCrawlerFactory::create($xmlContent);
|
||||
$response = $this->parser->parse($crawler->filter('ergebnis'));
|
||||
|
||||
$this->assertTrue($response->isInquiryValid());
|
||||
@@ -102,7 +102,7 @@ class BookingResponseParserTest extends TestCase
|
||||
<zahlungsbedingungen></zahlungsbedingungen>
|
||||
</ergebnis>';
|
||||
|
||||
$crawler = new Crawler($xmlContent);
|
||||
$crawler = XmlCrawlerFactory::create($xmlContent);
|
||||
$response = $this->parser->parse($crawler->filter('ergebnis'));
|
||||
|
||||
$this->assertTrue($response->isInquiryValid());
|
||||
@@ -140,7 +140,7 @@ class BookingResponseParserTest extends TestCase
|
||||
</zahlungsbedingungen>
|
||||
</ergebnis>';
|
||||
|
||||
$crawler = new Crawler($xmlContent);
|
||||
$crawler = XmlCrawlerFactory::create($xmlContent);
|
||||
$response = $this->parser->parse($crawler->filter('ergebnis'));
|
||||
|
||||
// Verify all voucher types are parsed
|
||||
@@ -169,7 +169,7 @@ class BookingResponseParserTest extends TestCase
|
||||
</zahlungsbedingungen>
|
||||
</ergebnis>';
|
||||
|
||||
$crawler = new Crawler($xmlContent);
|
||||
$crawler = XmlCrawlerFactory::create($xmlContent);
|
||||
$response = $this->parser->parse($crawler->filter('ergebnis'));
|
||||
|
||||
$this->assertTrue($response->isInquiryValid());
|
||||
@@ -200,7 +200,7 @@ class BookingResponseParserTest extends TestCase
|
||||
</zahlungsbedingungen>
|
||||
</ergebnis>';
|
||||
|
||||
$crawler = new Crawler($xmlContent);
|
||||
$crawler = XmlCrawlerFactory::create($xmlContent);
|
||||
$response = $this->parser->parse($crawler->filter('ergebnis'));
|
||||
|
||||
// Verify multiple purchase vouchers are parsed
|
||||
@@ -228,7 +228,7 @@ class BookingResponseParserTest extends TestCase
|
||||
</zahlungsbedingungen>
|
||||
</ergebnis>';
|
||||
|
||||
$crawler = new Crawler($xmlContent);
|
||||
$crawler = XmlCrawlerFactory::create($xmlContent);
|
||||
$response = $this->parser->parse($crawler->filter('ergebnis'));
|
||||
|
||||
$this->assertTrue($response->isInquiryValid());
|
||||
@@ -269,7 +269,7 @@ class BookingResponseParserTest extends TestCase
|
||||
</zahlungsbedingungen>
|
||||
</ergebnis>';
|
||||
|
||||
$crawler = new Crawler($xmlContent);
|
||||
$crawler = XmlCrawlerFactory::create($xmlContent);
|
||||
$response = $this->parser->parse($crawler->filter('ergebnis'));
|
||||
|
||||
// Voucher discount should only include AKTION
|
||||
@@ -305,7 +305,7 @@ class BookingResponseParserTest extends TestCase
|
||||
</zahlungsbedingungen>
|
||||
</ergebnis>';
|
||||
|
||||
$crawler = new Crawler($xmlContent);
|
||||
$crawler = XmlCrawlerFactory::create($xmlContent);
|
||||
$response = $this->parser->parse($crawler->filter('ergebnis'));
|
||||
|
||||
// Verify no API-applied discounts
|
||||
@@ -333,7 +333,7 @@ class BookingResponseParserTest extends TestCase
|
||||
</zahlungsbedingungen>
|
||||
</ergebnis>';
|
||||
|
||||
$crawler = new Crawler($xmlContent);
|
||||
$crawler = XmlCrawlerFactory::create($xmlContent);
|
||||
$response = $this->parser->parse($crawler->filter('ergebnis'));
|
||||
|
||||
$this->assertTrue($response->isInquiryValid());
|
||||
@@ -366,7 +366,7 @@ class BookingResponseParserTest extends TestCase
|
||||
</zahlungsbedingungen>
|
||||
</ergebnis>';
|
||||
|
||||
$crawler = new Crawler($xmlContent);
|
||||
$crawler = XmlCrawlerFactory::create($xmlContent);
|
||||
$response = $this->parser->parse($crawler->filter('ergebnis'));
|
||||
|
||||
// Only ERM (Gruppenrabatt) should be counted as API-applied discount
|
||||
|
||||
@@ -5,9 +5,9 @@ declare(strict_types=1);
|
||||
namespace App\Tests\BusProNet\XmlParser;
|
||||
|
||||
use App\BusProNet\Model\CrmAttributes;
|
||||
use App\BusProNet\XmlCrawlerFactory;
|
||||
use App\BusProNet\XmlParser\CrmAttributesResponseParser;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\DomCrawler\Crawler;
|
||||
|
||||
class CrmAttributesResponseParserTest extends TestCase
|
||||
{
|
||||
@@ -82,7 +82,7 @@ class CrmAttributesResponseParserTest extends TestCase
|
||||
// A house that is deliberately left out of bpn_crm_house_manager_ids claims nothing —
|
||||
// matching is by id, never by label.
|
||||
$parser = new CrmAttributesResponseParser([]);
|
||||
$attributes = $parser->parse((new Crawler($this->hausleitungXml()))->filterXPath('//ergebnis'));
|
||||
$attributes = $parser->parse(XmlCrawlerFactory::create($this->hausleitungXml())->filterXPath('//ergebnis'));
|
||||
|
||||
self::assertSame([], $attributes->roles);
|
||||
self::assertSame([], $attributes->hotelCodes);
|
||||
@@ -108,7 +108,7 @@ class CrmAttributesResponseParserTest extends TestCase
|
||||
|
||||
private function parse(string $xmlContent): CrmAttributes
|
||||
{
|
||||
$crawler = new Crawler($xmlContent);
|
||||
$crawler = XmlCrawlerFactory::create($xmlContent);
|
||||
$resultNode = $crawler->filterXPath('//ergebnis');
|
||||
|
||||
return $this->parser->parse($resultNode);
|
||||
|
||||
@@ -4,9 +4,9 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Tests\BusProNet\XmlParser;
|
||||
|
||||
use App\BusProNet\XmlCrawlerFactory;
|
||||
use App\BusProNet\XmlParser\ExtendedAvailabilitiesParser;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\DomCrawler\Crawler;
|
||||
|
||||
class ExtendedAvailabilitiesParserTest extends TestCase
|
||||
{
|
||||
@@ -28,7 +28,7 @@ class ExtendedAvailabilitiesParserTest extends TestCase
|
||||
<reise status="Frei" buchungstatusmoeglich="FA" />
|
||||
</ergebnis>';
|
||||
|
||||
$crawler = new Crawler($xml);
|
||||
$crawler = XmlCrawlerFactory::create($xml);
|
||||
$response = $this->parser->parseServices($crawler);
|
||||
|
||||
$services = $response->getServices();
|
||||
@@ -58,7 +58,7 @@ class ExtendedAvailabilitiesParserTest extends TestCase
|
||||
</leistungen>
|
||||
</ergebnis>';
|
||||
|
||||
$crawler = new Crawler($xml);
|
||||
$crawler = XmlCrawlerFactory::create($xml);
|
||||
$response = $this->parser->parseServices($crawler);
|
||||
|
||||
$services = $response->getServices();
|
||||
@@ -78,7 +78,7 @@ class ExtendedAvailabilitiesParserTest extends TestCase
|
||||
<reise status="Frei" buchungstatusmoeglich="FA" />
|
||||
</ergebnis>';
|
||||
|
||||
$crawler = new Crawler($xml);
|
||||
$crawler = XmlCrawlerFactory::create($xml);
|
||||
$response = $this->parser->parseServices($crawler);
|
||||
|
||||
$this->assertSame('Frei', $response->travelStatus);
|
||||
@@ -93,7 +93,7 @@ class ExtendedAvailabilitiesParserTest extends TestCase
|
||||
<reise status="Frei" buchungstatusmoeglich="" />
|
||||
</ergebnis>';
|
||||
|
||||
$crawler = new Crawler($xml);
|
||||
$crawler = XmlCrawlerFactory::create($xml);
|
||||
$response = $this->parser->parseServices($crawler);
|
||||
|
||||
$this->assertSame([], $response->allowedBookingStatus);
|
||||
@@ -106,7 +106,7 @@ class ExtendedAvailabilitiesParserTest extends TestCase
|
||||
<leistungen />
|
||||
</ergebnis>';
|
||||
|
||||
$crawler = new Crawler($xml);
|
||||
$crawler = XmlCrawlerFactory::create($xml);
|
||||
$response = $this->parser->parseServices($crawler);
|
||||
|
||||
$this->assertNull($response->travelStatus);
|
||||
@@ -120,7 +120,7 @@ class ExtendedAvailabilitiesParserTest extends TestCase
|
||||
<leistungen />
|
||||
</ergebnis>';
|
||||
|
||||
$crawler = new Crawler($xml);
|
||||
$crawler = XmlCrawlerFactory::create($xml);
|
||||
$response = $this->parser->parseServices($crawler);
|
||||
|
||||
$this->assertSame([], $response->getServices());
|
||||
|
||||
@@ -4,9 +4,9 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Tests\BusProNet\XmlParser;
|
||||
|
||||
use App\BusProNet\XmlCrawlerFactory;
|
||||
use App\BusProNet\XmlParser\InsuranceParser;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\DomCrawler\Crawler;
|
||||
|
||||
class InsuranceParserTest extends TestCase
|
||||
{
|
||||
@@ -36,7 +36,7 @@ class InsuranceParserTest extends TestCase
|
||||
</versicherungspakete>
|
||||
</versicherungsstammdaten>';
|
||||
|
||||
$crawler = new Crawler($xmlContent);
|
||||
$crawler = XmlCrawlerFactory::create($xmlContent);
|
||||
$insurances = $this->parser->parse($crawler);
|
||||
|
||||
// Test all insurances are included (2 regular + 1 complementary + 1 package = 4 total)
|
||||
@@ -112,7 +112,7 @@ class InsuranceParserTest extends TestCase
|
||||
</versicherungspakete>
|
||||
</versicherungsstammdaten>';
|
||||
|
||||
$crawler = new Crawler($xmlContent);
|
||||
$crawler = XmlCrawlerFactory::create($xmlContent);
|
||||
$insurances = $this->parser->parse($crawler);
|
||||
|
||||
$this->assertCount(2, $insurances);
|
||||
@@ -134,7 +134,7 @@ class InsuranceParserTest extends TestCase
|
||||
</versicherungen>
|
||||
</versicherungsstammdaten>';
|
||||
|
||||
$crawler = new Crawler($xmlContent);
|
||||
$crawler = XmlCrawlerFactory::create($xmlContent);
|
||||
$insurances = $this->parser->parse($crawler);
|
||||
|
||||
$this->assertCount(1, $insurances);
|
||||
@@ -155,7 +155,7 @@ class InsuranceParserTest extends TestCase
|
||||
</versicherungspakete>
|
||||
</versicherungsstammdaten>';
|
||||
|
||||
$crawler = new Crawler($xmlContent);
|
||||
$crawler = XmlCrawlerFactory::create($xmlContent);
|
||||
$insurances = $this->parser->parse($crawler);
|
||||
|
||||
$this->assertEmpty($insurances);
|
||||
@@ -179,7 +179,7 @@ class InsuranceParserTest extends TestCase
|
||||
</versicherungspakete>
|
||||
</versicherungsstammdaten>';
|
||||
|
||||
$crawler = new Crawler($xmlContent);
|
||||
$crawler = XmlCrawlerFactory::create($xmlContent);
|
||||
$insurances = $this->parser->parse($crawler);
|
||||
|
||||
// Should include: normal insurance (178917), both complementary insurances (177270, 999999), and package (P1000320)
|
||||
|
||||
@@ -4,9 +4,9 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Tests\BusProNet\XmlParser;
|
||||
|
||||
use App\BusProNet\XmlCrawlerFactory;
|
||||
use App\BusProNet\XmlParser\PersonalDataParser;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\DomCrawler\Crawler;
|
||||
|
||||
class PersonalDataParserTest extends TestCase
|
||||
{
|
||||
@@ -46,7 +46,7 @@ class PersonalDataParserTest extends TestCase
|
||||
|
||||
private function parse(string $xml): \App\BusProNet\Model\PersonalData
|
||||
{
|
||||
return $this->parser->parse(new Crawler($xml));
|
||||
return $this->parser->parse(XmlCrawlerFactory::create($xml));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,9 +4,9 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Tests\BusProNet\XmlParser;
|
||||
|
||||
use App\BusProNet\XmlCrawlerFactory;
|
||||
use App\BusProNet\XmlParser\TravelParser;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\DomCrawler\Crawler;
|
||||
|
||||
class TravelParserTest extends TestCase
|
||||
{
|
||||
@@ -68,7 +68,7 @@ class TravelParserTest extends TestCase
|
||||
</reise>
|
||||
</reisen>';
|
||||
|
||||
$crawler = new Crawler($xmlContent);
|
||||
$crawler = XmlCrawlerFactory::create($xmlContent);
|
||||
$travelNode = $crawler->filterXPath('//reise/termin')->first();
|
||||
$travel = $this->parser->parse($travelNode);
|
||||
|
||||
@@ -135,7 +135,7 @@ class TravelParserTest extends TestCase
|
||||
</reise>
|
||||
</reisen>';
|
||||
|
||||
$crawler = new Crawler($xmlContent);
|
||||
$crawler = XmlCrawlerFactory::create($xmlContent);
|
||||
$travelNode = $crawler->filterXPath('//reise/termin')->first();
|
||||
$travel = $this->parser->parse($travelNode);
|
||||
|
||||
@@ -166,7 +166,7 @@ class TravelParserTest extends TestCase
|
||||
</reise>
|
||||
</reisen>';
|
||||
|
||||
$crawler = new Crawler($xmlContent);
|
||||
$crawler = XmlCrawlerFactory::create($xmlContent);
|
||||
$travelNode = $crawler->filterXPath('//reise/termin')->first();
|
||||
$travel = $this->parser->parse($travelNode);
|
||||
|
||||
@@ -201,7 +201,7 @@ class TravelParserTest extends TestCase
|
||||
</reise>
|
||||
</reisen>';
|
||||
|
||||
$crawler = new Crawler($xmlContent);
|
||||
$crawler = XmlCrawlerFactory::create($xmlContent);
|
||||
$travelNode = $crawler->filterXPath('//reise/termin')->first();
|
||||
$travel = $this->parser->parse($travelNode);
|
||||
|
||||
@@ -240,7 +240,7 @@ class TravelParserTest extends TestCase
|
||||
</reise>
|
||||
</reisen>';
|
||||
|
||||
$crawler = new Crawler($xmlContent);
|
||||
$crawler = XmlCrawlerFactory::create($xmlContent);
|
||||
$travelNode = $crawler->filterXPath('//reise/termin')->first();
|
||||
$travel = $this->parser->parse($travelNode);
|
||||
|
||||
@@ -284,7 +284,7 @@ class TravelParserTest extends TestCase
|
||||
</reise>
|
||||
</reisen>';
|
||||
|
||||
$crawler = new Crawler($xmlContent);
|
||||
$crawler = XmlCrawlerFactory::create($xmlContent);
|
||||
$travelNode = $crawler->filterXPath('//reise/termin')->first();
|
||||
$travel = $this->parser->parse($travelNode);
|
||||
|
||||
@@ -319,7 +319,7 @@ class TravelParserTest extends TestCase
|
||||
</reise>
|
||||
</reisen>';
|
||||
|
||||
$crawler = new Crawler($xmlContent);
|
||||
$crawler = XmlCrawlerFactory::create($xmlContent);
|
||||
$travelNode = $crawler->filterXPath('//reise/termin')->first();
|
||||
$travel = $this->parser->parse($travelNode);
|
||||
|
||||
@@ -347,7 +347,7 @@ class TravelParserTest extends TestCase
|
||||
</reise>
|
||||
</reisen>';
|
||||
|
||||
$crawler = new Crawler($xmlContent);
|
||||
$crawler = XmlCrawlerFactory::create($xmlContent);
|
||||
$travelNode = $crawler->filterXPath('//reise/termin')->first();
|
||||
$travel = $this->parser->parse($travelNode);
|
||||
|
||||
@@ -364,7 +364,7 @@ class TravelParserTest extends TestCase
|
||||
<zustieg idbuspro="4" zeit="01:00" preis="0,00" />
|
||||
</zustiege>';
|
||||
|
||||
$crawler = new Crawler($xml);
|
||||
$crawler = XmlCrawlerFactory::create($xml);
|
||||
$defaultDate = new \DateTimeImmutable('2029-12-30');
|
||||
|
||||
$pickups = $this->parser->getPickups(
|
||||
@@ -392,7 +392,7 @@ class TravelParserTest extends TestCase
|
||||
<zustieg idbuspro="2" zeit="30.12.2029 20:30" preis="0,00" />
|
||||
</zustiege>';
|
||||
|
||||
$crawler = new Crawler($xml);
|
||||
$crawler = XmlCrawlerFactory::create($xml);
|
||||
$defaultDate = new \DateTimeImmutable('2029-12-30');
|
||||
|
||||
$pickups = $this->parser->getPickups(
|
||||
@@ -413,7 +413,7 @@ class TravelParserTest extends TestCase
|
||||
<zustieg idbuspro="2" zeit="01:00" preis="0,00" />
|
||||
</zustiege>';
|
||||
|
||||
$crawler = new Crawler($xml);
|
||||
$crawler = XmlCrawlerFactory::create($xml);
|
||||
$defaultDate = new \DateTimeImmutable('2029-12-30');
|
||||
|
||||
$pickups = $this->parser->getPickups(
|
||||
|
||||
@@ -88,7 +88,7 @@ class BpnSyncContingentsCommandTest extends TestCase
|
||||
);
|
||||
|
||||
$application = new Application();
|
||||
$application->add($command);
|
||||
$application->addCommand($command);
|
||||
|
||||
$tester = new CommandTester($application->find('app:bpn:sync-contingents'));
|
||||
$tester->execute(['--horizon-months' => '1']);
|
||||
|
||||
@@ -299,7 +299,7 @@ final class TestablePersonalDataController extends PersonalDataController
|
||||
$this->flashes[] = [$type, (string) $message];
|
||||
}
|
||||
|
||||
protected function render(string $view, array $parameters = [], Response $response = null): Response
|
||||
protected function render(string $view, array $parameters = [], ?Response $response = null): Response
|
||||
{
|
||||
$this->renderedView = $view;
|
||||
$this->renderedParameters = $parameters;
|
||||
|
||||
@@ -8,8 +8,9 @@ use App\BusProNet\Constants;
|
||||
use App\BusProNet\Model\Booking;
|
||||
use App\BusProNet\Model\Service;
|
||||
use App\BusProNet\Model\Travel;
|
||||
use App\BusProNet\XmlParser\TravelParser;
|
||||
use App\BusProNet\Utility\DirectionMapper;
|
||||
use App\BusProNet\XmlCrawlerFactory;
|
||||
use App\BusProNet\XmlParser\TravelParser;
|
||||
use App\Form\Model\BookingDto;
|
||||
use App\Form\Model\ParticipantDto;
|
||||
use App\Form\Service\ParticipantFieldOptionsProvider;
|
||||
@@ -18,7 +19,6 @@ use App\Service\InsuranceManager;
|
||||
use App\Service\ServiceAvailabilityCalculator;
|
||||
use App\Service\ServiceLabelFormatter;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\DomCrawler\Crawler;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
class ParticipantFieldOptionsProviderBabyTest extends TestCase
|
||||
@@ -488,7 +488,7 @@ class ParticipantFieldOptionsProviderBabyTest extends TestCase
|
||||
private function createTravelWithExportedSkiPasses(array $serviceIds): Travel
|
||||
{
|
||||
$parser = new TravelParser();
|
||||
$crawler = new Crawler(file_get_contents('/var/www/html/var/xmlexport/Ziel_2456.xml'));
|
||||
$crawler = XmlCrawlerFactory::create(file_get_contents('/var/www/html/var/xmlexport/Ziel_2456.xml'));
|
||||
$travelNode = $crawler->filterXPath('//reise/termin')->first();
|
||||
$travel = $parser->parse($travelNode);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user