This commit is contained in:
terrafrost 2020-12-12 20:13:42 -06:00
parent 7237c0f803
commit 1a30cd862f
6 changed files with 54 additions and 1 deletions

View File

@ -259,4 +259,19 @@ dlN48qLbSmUgsO7gq/1vodebMSHcduV4JTq8ix5Ey87QAAABQhHEzWiduF4V0DestSnJ3q
class LoadDSAKeyTest extends Unit_Crypt_DSA_LoadDSAKeyTest
{
/**
* @expectedException \phpseclib3\Exception\NoKeyLoadedException
*/
public function testBadKey()
{
parent::testBadKey();
}
/**
* @expectedException \phpseclib3\Exception\NoKeyLoadedException
*/
public function testPuTTYBadMAC()
{
parent::testPuTTYBadMac();
}
}

View File

@ -468,4 +468,19 @@ class Unit_Crypt_HashTest extends PhpseclibTestCase
class HashTest extends Unit_Crypt_HashTest
{
/**
* @expectedException \phpseclib3\Exception\UnsupportedAlgorithmException
*/
public function testConstructorArgumentInvalid()
{
parent::testConstructorArgumentInvalid();
}
/**
* @expectedException \phpseclib3\Exception\UnsupportedAlgorithmException
*/
public function testSetHashInvalid()
{
parent::testSetHashInvalid();
}
}

View File

@ -1049,4 +1049,19 @@ n9dyFZYXxil/cgFG/PDMnuXy1Wcl8hb8iwQag4Y7ohiLXVTJa/0BAgMBAAE=
class LoadKeyTest extends Unit_Crypt_RSA_LoadKeyTest
{
/**
* @expectedException \phpseclib3\Exception\NoKeyLoadedException
*/
public function testBadKey()
{
parent::testBadKey();
}
/**
* @expectedException \phpseclib3\Exception\UnsupportedFormatException
*/
public function testSavePasswordXML()
{
parent::testSavePasswordXML();
}
}

View File

@ -187,4 +187,11 @@ HERE;
class ModeTest extends Unit_Crypt_RSA_ModeTest
{
/**
* @expectedException \LengthException
*/
public function testSmallModulo()
{
parent::testSmallModulo();
}
}

View File

@ -42,7 +42,7 @@ class Unit_Net_SSH2UnitTest extends PhpseclibTestCase
$this->assertStringStartsWith('SSH-2.0-phpseclib_3.0', $identifier);
if (function_exists('sodium_crypto_sign_keypair')) {
$this->assertContains('libsodium', $identifier);
$this->assertStringContainsString('libsodium', $identifier);
}
if (extension_loaded('openssl')) {

View File

@ -25,6 +25,7 @@ then
find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/n setUpBeforeClass()/n setUpBeforeClass(): void/g'
find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/n setUp()/n setUp(): void/g'
find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/n tearDown()/n tearDown(): void/g'
find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/n assertSame()/n assertSame(): void/g'
find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/\(n assertIsArray([^)]*)\)/\1: void/g'
find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/\(n assertIsString([^)]*)\)/\1: void/g'
find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/\(n assertIsResource([^)]*)\)/\1: void/g'