InstallTest.php 627 B

123456789101112131415161718192021222324
  1. <?php
  2. declare(strict_types=1);
  3. require_once LIB_PATH . '/lib_install.php';
  4. use PHPUnit\Framework\Attributes\DataProvider;
  5. final class InstallTest extends \PHPUnit\Framework\TestCase {
  6. /**
  7. * @return list<array{int,bool,'ok'|'ko'|null}>
  8. */
  9. public static function provideGmpRequirementStatus(): array {
  10. return [
  11. [8, false, null],
  12. [4, true, 'ok'],
  13. [4, false, 'ko'],
  14. ];
  15. }
  16. #[DataProvider('provideGmpRequirementStatus')]
  17. public function testGmpRequirementStatus(int $integerSize, bool $gmpLoaded, ?string $expected): void {
  18. self::assertSame($expected, gmpRequirementStatus($integerSize, $gmpLoaded));
  19. }
  20. }