Upgrade tests to PhpUnit 10 (#5252)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user