mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-07-30 08:47:10 -04:00
* Check GMP during 32-bit installation - add an installer prerequisite for GMP when PHP uses 32-bit integers - stop installation before favourite export can call GMP functions that are unavailable - cover 32-bit and 64-bit GMP requirement states Google Reader-compatible entry identifiers require GMP on 32-bit PHP. The installer did not check that prerequisite, so a missing extension could instead cause a fatal error during favourite export. * i18n: fr --------- Co-authored-by: Gerard Alvear <gerard.alvear@logiqd.me> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
25 lines
627 B
PHP
25 lines
627 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
require_once LIB_PATH . '/lib_install.php';
|
|
|
|
use PHPUnit\Framework\Attributes\DataProvider;
|
|
|
|
final class InstallTest extends \PHPUnit\Framework\TestCase {
|
|
/**
|
|
* @return list<array{int,bool,'ok'|'ko'|null}>
|
|
*/
|
|
public static function provideGmpRequirementStatus(): array {
|
|
return [
|
|
[8, false, null],
|
|
[4, true, 'ok'],
|
|
[4, false, 'ko'],
|
|
];
|
|
}
|
|
|
|
#[DataProvider('provideGmpRequirementStatus')]
|
|
public function testGmpRequirementStatus(int $integerSize, bool $gmpLoaded, ?string $expected): void {
|
|
self::assertSame($expected, gmpRequirementStatus($integerSize, $gmpLoaded));
|
|
}
|
|
}
|