Upgrade tests to PhpUnit 10 (#5252)

This commit is contained in:
Kevin Papst
2024-12-22 01:25:30 +01:00
committed by GitHub
parent 9bd37fb695
commit c7f0508707
377 changed files with 3308 additions and 3409 deletions

View File

@@ -55,7 +55,7 @@ class InvoiceDocumentRepositoryTest extends TestCase
$sut->getUploadDirectory();
$this->fail('Expected exception was not raised');
} catch (\Exception $ex) {
$this->assertEquals('Unknown upload directory', $ex->getMessage());
self::assertEquals('Unknown upload directory', $ex->getMessage());
}
$path = realpath(__DIR__ . '/../Invoice/templates/');
@@ -87,16 +87,16 @@ class InvoiceDocumentRepositoryTest extends TestCase
{
$sut = new InvoiceDocumentRepository(self::$defaultDirectories);
$all = $sut->findAll();
$this->assertCount(\count(self::$defaultDocuments), $all);
self::assertCount(\count(self::$defaultDocuments), $all);
foreach ($all as $document) {
$this->assertTrue(\in_array($document->getName(), self::$defaultDocuments), 'Missing template: ' . $document->getName());
self::assertTrue(\in_array($document->getName(), self::$defaultDocuments), 'Missing template: ' . $document->getName());
}
foreach (self::$defaultDocuments as $filename) {
$filename = substr($filename, 0, strpos($filename, '.'));
$actual = $sut->findByName($filename);
$this->assertNotNull($actual);
self::assertNotNull($actual);
}
}
}