X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=tests%2Fsrc%2FUtil%2FCryptoTest.php;h=82afc24832264f94a1f4c8e13cf3600749efc9a2;hb=360614d2cf3aceeb763ef1281ad5236878f5d735;hp=1a25e171953a052362e19c0f93ab3ca3ab7e7916;hpb=efaec26b1d8aa9af88994eaddafc7fcec4ae9ce1;p=friendica.git diff --git a/tests/src/Util/CryptoTest.php b/tests/src/Util/CryptoTest.php index 1a25e17195..82afc24832 100644 --- a/tests/src/Util/CryptoTest.php +++ b/tests/src/Util/CryptoTest.php @@ -1,6 +1,6 @@ [ @@ -81,34 +92,6 @@ class CryptoTest extends TestCase ], ]; } - - /** - * @dataProvider dataPEM - */ - public function testPemToMe(string $key) - { - Crypto::pemToMe($key, $m, $e); - - $expectedRSA = new RSA(); - $expectedRSA->loadKey([ - 'e' => new BigInteger($e, 256), - 'n' => new BigInteger($m, 256) - ]); - - self::assertEquals($expectedRSA->getPublicKey(), $key); - } - - /** - * @dataProvider dataPEM - */ - public function testMeToPem(string $key) - { - Crypto::pemToMe($key, $m, $e); - - $checkKey = Crypto::meToPem($m, $e); - - self::assertEquals($key, $checkKey); - } } /** @@ -120,7 +103,6 @@ function random_int($min, $max) { global $phpMock; if (isset($phpMock['random_int'])) { - $result = call_user_func_array($phpMock['random_int'], func_get_args()); - return $result; + return call_user_func_array($phpMock['random_int'], func_get_args()); } }