getParameter('kernel.project_dir'); /** @var TranslatorInterface $translator */ $translator = static::getContainer()->get(TranslatorInterface::class); $renderer = new ContractRenderer($translator, ['project_dir' => $projectDir]); $address = new Address(); $address ->setStreet('Testweg 1') ->setCity('Teststadt') ->setPostCode('12345') ; $communication = new Communication(); $communication ->setEmail('test@example.com') ->setPhone('123456789') ->setMobile('0123-456789') ; $teamer = new Teamer(); $teamer ->setFirstName('Isolde') ->setLastName('Duschen') ->setAddress($address) ; $destination = new Destination(); $destination ->setProduct('Skireise') ->setHotel('Unterkunft') ->setCode('ABC123') ->setDateFrom(new \DateTimeImmutable('2023-12-01')) ->setDateTo(new \DateTimeImmutable('2023-12-08')) ; $jobProfile = new JobProfile(); $jobProfile->setName('Allrounder'); $contact = new User(); $contact ->setFirstName('Carmen') ->setLastName('Bär') ->setEmail('carmen.baer@ep-reisen.de') ; $assignment = new Assignment(); $assignment ->setDestination($destination) ->setJobProfile($jobProfile) ->setContact($contact) ; $application = new Application($assignment, $teamer); $disposition = new Disposition($application); $pdf = $renderer->render($disposition); $this->assertInstanceOf(Pdf::class, $pdf); $pdf->Output('F', $projectDir.'/temp/Honorarvertrag.pdf'); } }