chore: upgrade phpunit to 12.5

This commit is contained in:
fromme committed 2026-10-01 10:07:05 +02:00
1 parent da039d0527
commit 849da8d471
53 files changed
+832 -856

No files matched your search

+6 -5
View File
@@ -25,7 +25,7 @@ class InvoiceRendererTest extends WebTestCase
public function testRendersInvoice(): void
{
$projectDir = static::getContainer()->getParameter('kernel.project_dir');
$translator = $this->createMock(TranslatorInterface::class);
$translator = $this->createStub(TranslatorInterface::class);
/** @var TranslatorInterface $translator */
$renderer = new InvoiceRenderer($translator, ['project_dir' => $projectDir]);
@@ -82,7 +82,7 @@ class InvoiceRendererTest extends WebTestCase
->setEmail('[email protected]')
;
$assignment = $this->createMock(Assignment::class);
$assignment = $this->createStub(Assignment::class);
$assignment->method('getId')->willReturn(1234);
$assignment->method('getDestination')->willReturn($destination);
$assignment->method('getJobProfile')->willReturn($jobProfile);
@@ -108,9 +108,10 @@ class InvoiceRendererTest extends WebTestCase
$disposition->addDocument($invoice);
$invoicePath = $projectDir.'/uploads/invoice/a/abcdef0123456789.pdf';
$uploadHandler = $this->createMock(UploadHandler::class);
$uploadHandler->method('getResolvedUploadFilepath')->with($invoice)->willReturn($invoicePath);
$uploadHandler->method('getUploadFilepath')->with($invoice)->willReturn($invoicePath);
$uploadHandler = $this->createStub(UploadHandler::class);
$filepath = static fn (Upload $upload): string => $invoice === $upload ? $invoicePath : throw new \LogicException('Unexpected upload');
$uploadHandler->method('getResolvedUploadFilepath')->willReturnCallback($filepath);
$uploadHandler->method('getUploadFilepath')->willReturnCallback($filepath);
/** @var TranslatorInterface $translator */
$approver = new InvoiceApprover($translator, ['project_dir' => $projectDir], $uploadHandler);