ScrambleMappingTest: mark skipped if the extensions are not present

Otherwise the ScrambleMapping constructor throws an exception.

Change-Id: I47a947639e0968bbee4d706ec081e5f7af390f26
This commit is contained in:
Tim Starling 2022-10-21 12:26:57 +11:00
parent d2b199c517
commit 0318d7cd43

View file

@ -10,6 +10,9 @@ use PHPUnit\Framework\TestCase;
*/
class ScrambleMappingTest extends TestCase {
public function testMap() {
if ( !extension_loaded( 'gmp' ) && !extension_loaded( 'bcmath' ) ) {
$this->markTestSkipped( 'need extension gmp or bcmath' );
}
$map = new ScrambleMapping( [] );
$duplicates = 0;
// This has been verified up to 1e8 but for CI purposes we will use 200