mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-17 18:55:13 +00:00
Clean Up Tests
This commit is contained in:
parent
887cf97185
commit
0a69972571
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
@ -42,7 +42,8 @@ jobs:
|
|||||||
tests:
|
tests:
|
||||||
name: Tests
|
name: Tests
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
continue-on-error: ${{ matrix.experimental }}
|
# Sometimes there is a segfault on PHP 5.6.
|
||||||
|
continue-on-error: ${{ matrix.php-version == '5.6' }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@ -85,8 +86,3 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
php-version: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1']
|
php-version: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1']
|
||||||
experimental: [false]
|
|
||||||
include:
|
|
||||||
- {os: ubuntu-latest, php-version: '8.2', experimental: true}
|
|
||||||
- {os: windows-latest, php-version: '8.2', experimental: true}
|
|
||||||
- {os: macos-latest, php-version: '8.2', experimental: true}
|
|
||||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,7 +1,5 @@
|
|||||||
/.idea/
|
/.idea/
|
||||||
/build/vendor/
|
|
||||||
/build/php-cs-fixer.cache
|
/build/php-cs-fixer.cache
|
||||||
/build/composer.lock
|
|
||||||
/composer.lock
|
/composer.lock
|
||||||
/composer.phar
|
/composer.phar
|
||||||
/vendor/
|
/vendor/
|
||||||
|
@ -3266,7 +3266,7 @@ class SFTP extends SSH2
|
|||||||
* @param int $request_id
|
* @param int $request_id
|
||||||
* @see self::_get_sftp_packet()
|
* @see self::_get_sftp_packet()
|
||||||
* @see self::send_channel_packet()
|
* @see self::send_channel_packet()
|
||||||
* @return bool
|
* @return void
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
private function send_sftp_packet($type, $data, $request_id = 1)
|
private function send_sftp_packet($type, $data, $request_id = 1)
|
||||||
@ -3280,7 +3280,7 @@ class SFTP extends SSH2
|
|||||||
pack('NCa*', strlen($data) + 1, $type, $data);
|
pack('NCa*', strlen($data) + 1, $type, $data);
|
||||||
|
|
||||||
$start = microtime(true);
|
$start = microtime(true);
|
||||||
$result = $this->send_channel_packet(self::CHANNEL, $packet);
|
$this->send_channel_packet(self::CHANNEL, $packet);
|
||||||
$stop = microtime(true);
|
$stop = microtime(true);
|
||||||
|
|
||||||
if (defined('NET_SFTP_LOGGING')) {
|
if (defined('NET_SFTP_LOGGING')) {
|
||||||
@ -3305,8 +3305,6 @@ class SFTP extends SSH2
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -3148,11 +3148,10 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Inputs a command into an interactive shell.
|
* Inputs a command into an interactive shell.
|
||||||
*
|
*
|
||||||
* @see self::read()
|
* @see SSH2::read()
|
||||||
* @param string $cmd
|
* @param string $cmd
|
||||||
* @return bool
|
* @return void
|
||||||
* @throws \RuntimeException on connection error
|
* @throws \RuntimeException on connection error
|
||||||
* @access public
|
|
||||||
*/
|
*/
|
||||||
public function write($cmd)
|
public function write($cmd)
|
||||||
{
|
{
|
||||||
@ -3164,7 +3163,7 @@ class SSH2
|
|||||||
throw new \RuntimeException('Unable to initiate an interactive shell session');
|
throw new \RuntimeException('Unable to initiate an interactive shell session');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->send_channel_packet($this->get_interactive_channel(), $cmd);
|
$this->send_channel_packet($this->get_interactive_channel(), $cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -4384,8 +4383,7 @@ class SSH2
|
|||||||
*
|
*
|
||||||
* @param int $client_channel
|
* @param int $client_channel
|
||||||
* @param string $data
|
* @param string $data
|
||||||
* @return bool
|
* @return void
|
||||||
* @access private
|
|
||||||
*/
|
*/
|
||||||
protected function send_channel_packet($client_channel, $data)
|
protected function send_channel_packet($client_channel, $data)
|
||||||
{
|
{
|
||||||
@ -4416,8 +4414,6 @@ class SSH2
|
|||||||
$this->window_size_client_to_server[$client_channel] -= strlen($temp);
|
$this->window_size_client_to_server[$client_channel] -= strlen($temp);
|
||||||
$this->send_binary_packet($packet);
|
$this->send_binary_packet($packet);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -771,10 +771,7 @@ class SFTPUserStoryTest extends PhpseclibFunctionalTestCase
|
|||||||
$this->assertEquals(
|
$this->assertEquals(
|
||||||
$list_cache_enabled,
|
$list_cache_enabled,
|
||||||
$list_cache_disabled,
|
$list_cache_disabled,
|
||||||
'The files should be the same regardless of stat cache',
|
'The files should be the same regardless of stat cache'
|
||||||
0.0,
|
|
||||||
10,
|
|
||||||
true
|
|
||||||
);
|
);
|
||||||
|
|
||||||
return $sftp;
|
return $sftp;
|
||||||
|
@ -29,6 +29,7 @@ class SSH2Test extends PhpseclibFunctionalTestCase
|
|||||||
* @depends testConstructor
|
* @depends testConstructor
|
||||||
* @group github408
|
* @group github408
|
||||||
* @group github412
|
* @group github412
|
||||||
|
* @param SSH2 $ssh
|
||||||
*/
|
*/
|
||||||
public function testPreLogin($ssh)
|
public function testPreLogin($ssh)
|
||||||
{
|
{
|
||||||
@ -62,6 +63,7 @@ class SSH2Test extends PhpseclibFunctionalTestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @depends testPreLogin
|
* @depends testPreLogin
|
||||||
|
* @param SSH2 $ssh
|
||||||
*/
|
*/
|
||||||
public function testBadPassword($ssh)
|
public function testBadPassword($ssh)
|
||||||
{
|
{
|
||||||
@ -87,6 +89,7 @@ class SSH2Test extends PhpseclibFunctionalTestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @depends testBadPassword
|
* @depends testBadPassword
|
||||||
|
* @param SSH2 $ssh
|
||||||
*/
|
*/
|
||||||
public function testPasswordLogin($ssh)
|
public function testPasswordLogin($ssh)
|
||||||
{
|
{
|
||||||
@ -108,6 +111,7 @@ class SSH2Test extends PhpseclibFunctionalTestCase
|
|||||||
/**
|
/**
|
||||||
* @depends testPasswordLogin
|
* @depends testPasswordLogin
|
||||||
* @group github280
|
* @group github280
|
||||||
|
* @param SSH2 $ssh
|
||||||
*/
|
*/
|
||||||
public function testExecWithMethodCallback($ssh)
|
public function testExecWithMethodCallback($ssh)
|
||||||
{
|
{
|
||||||
@ -146,6 +150,7 @@ class SSH2Test extends PhpseclibFunctionalTestCase
|
|||||||
/**
|
/**
|
||||||
* @depends testExecWithMethodCallback
|
* @depends testExecWithMethodCallback
|
||||||
* @group github1009
|
* @group github1009
|
||||||
|
* @param SSH2 $ssh
|
||||||
*/
|
*/
|
||||||
public function testDisablePTY($ssh)
|
public function testDisablePTY($ssh)
|
||||||
{
|
{
|
||||||
@ -162,6 +167,7 @@ class SSH2Test extends PhpseclibFunctionalTestCase
|
|||||||
/**
|
/**
|
||||||
* @depends testDisablePTY
|
* @depends testDisablePTY
|
||||||
* @group github1167
|
* @group github1167
|
||||||
|
* @param SSH2 $ssh
|
||||||
*/
|
*/
|
||||||
public function testChannelDataAfterOpen($ssh)
|
public function testChannelDataAfterOpen($ssh)
|
||||||
{
|
{
|
||||||
@ -171,7 +177,7 @@ class SSH2Test extends PhpseclibFunctionalTestCase
|
|||||||
// when consolekit was incorporated.
|
// when consolekit was incorporated.
|
||||||
// https://marc.info/?l=openssh-unix-dev&m=163409903417589&w=2 discusses some of the
|
// https://marc.info/?l=openssh-unix-dev&m=163409903417589&w=2 discusses some of the
|
||||||
// issues with how Ubuntu incorporated consolekit
|
// issues with how Ubuntu incorporated consolekit
|
||||||
$pattern = '#^SSH-2\.0-OpenSSH_([\d\.]+)[^ ]* Ubuntu-.*$#';
|
$pattern = '#^SSH-2\.0-OpenSSH_([\d.]+)[^ ]* Ubuntu-.*$#';
|
||||||
$match = preg_match($pattern, $ssh->getServerIdentification(), $matches);
|
$match = preg_match($pattern, $ssh->getServerIdentification(), $matches);
|
||||||
$match = $match && version_compare('5.8', $matches[1], '<=');
|
$match = $match && version_compare('5.8', $matches[1], '<=');
|
||||||
$match = $match && version_compare('6.9', $matches[1], '>=');
|
$match = $match && version_compare('6.9', $matches[1], '>=');
|
||||||
@ -188,6 +194,6 @@ class SSH2Test extends PhpseclibFunctionalTestCase
|
|||||||
|
|
||||||
$ssh->setTimeout(1);
|
$ssh->setTimeout(1);
|
||||||
|
|
||||||
$ssh->read();
|
$this->assertIsString($ssh->read());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -86,27 +86,6 @@ abstract class PhpseclibTestCase extends TestCase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string $filename Filename relative to library directory.
|
|
||||||
*
|
|
||||||
* @return null
|
|
||||||
*/
|
|
||||||
protected static function reRequireFile($filename)
|
|
||||||
{
|
|
||||||
if (extension_loaded('runkit')) {
|
|
||||||
$result = runkit_import(
|
|
||||||
sprintf('%s/../phpseclib/%s', __DIR__, $filename),
|
|
||||||
RUNKIT_IMPORT_FUNCTIONS |
|
|
||||||
RUNKIT_IMPORT_CLASS_METHODS |
|
|
||||||
RUNKIT_IMPORT_OVERRIDE
|
|
||||||
);
|
|
||||||
|
|
||||||
if (!$result) {
|
|
||||||
self::markTestSkipped("Failed to reimport file $filename");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected static function getVar($obj, $var)
|
protected static function getVar($obj, $var)
|
||||||
{
|
{
|
||||||
$reflection = new \ReflectionClass(get_class($obj));
|
$reflection = new \ReflectionClass(get_class($obj));
|
||||||
@ -126,7 +105,7 @@ abstract class PhpseclibTestCase extends TestCase
|
|||||||
// assertIsArray was not introduced until PHPUnit 8
|
// assertIsArray was not introduced until PHPUnit 8
|
||||||
public static function assertIsArray($actual, $message = '')
|
public static function assertIsArray($actual, $message = '')
|
||||||
{
|
{
|
||||||
if (method_exists('\PHPUnit\Framework\TestCase', 'assertIsArray')) {
|
if (method_exists(parent::class, 'assertIsArray')) {
|
||||||
parent::assertIsArray($actual, $message);
|
parent::assertIsArray($actual, $message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -137,7 +116,7 @@ abstract class PhpseclibTestCase extends TestCase
|
|||||||
// assertIsString was not introduced until PHPUnit 8
|
// assertIsString was not introduced until PHPUnit 8
|
||||||
public static function assertIsString($actual, $message = '')
|
public static function assertIsString($actual, $message = '')
|
||||||
{
|
{
|
||||||
if (method_exists('\PHPUnit\Framework\TestCase', 'assertIsString')) {
|
if (method_exists(parent::class, 'assertIsString')) {
|
||||||
parent::assertIsString($actual, $message);
|
parent::assertIsString($actual, $message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -148,7 +127,7 @@ abstract class PhpseclibTestCase extends TestCase
|
|||||||
// assertIsResource was not introduced until PHPUnit 8
|
// assertIsResource was not introduced until PHPUnit 8
|
||||||
public static function assertIsResource($actual, $message = '')
|
public static function assertIsResource($actual, $message = '')
|
||||||
{
|
{
|
||||||
if (method_exists('\PHPUnit\Framework\TestCase', 'assertIsResource')) {
|
if (method_exists(parent::class, 'assertIsResource')) {
|
||||||
parent::assertIsResource($actual, $message);
|
parent::assertIsResource($actual, $message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -159,7 +138,7 @@ abstract class PhpseclibTestCase extends TestCase
|
|||||||
// assertIsObject was not introduced until PHPUnit 8
|
// assertIsObject was not introduced until PHPUnit 8
|
||||||
public static function assertIsObject($actual, $message = '')
|
public static function assertIsObject($actual, $message = '')
|
||||||
{
|
{
|
||||||
if (method_exists('\PHPUnit\Framework\TestCase', 'assertIsObject')) {
|
if (method_exists(parent::class, 'assertIsObject')) {
|
||||||
parent::assertIsObject($actual, $message);
|
parent::assertIsObject($actual, $message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -170,7 +149,7 @@ abstract class PhpseclibTestCase extends TestCase
|
|||||||
// assertContains is deprecated for strings in PHPUnit 8
|
// assertContains is deprecated for strings in PHPUnit 8
|
||||||
public static function assertStringContainsString($needle, $haystack, $message = '')
|
public static function assertStringContainsString($needle, $haystack, $message = '')
|
||||||
{
|
{
|
||||||
if (method_exists('\PHPUnit\Framework\TestCase', 'assertStringContainsString')) {
|
if (method_exists(parent::class, 'assertStringContainsString')) {
|
||||||
parent::assertStringContainsString($needle, $haystack, $message);
|
parent::assertStringContainsString($needle, $haystack, $message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -181,11 +160,28 @@ abstract class PhpseclibTestCase extends TestCase
|
|||||||
// assertNotContains is deprecated for strings in PHPUnit 8
|
// assertNotContains is deprecated for strings in PHPUnit 8
|
||||||
public static function assertStringNotContainsString($needle, $haystack, $message = '')
|
public static function assertStringNotContainsString($needle, $haystack, $message = '')
|
||||||
{
|
{
|
||||||
if (method_exists('\PHPUnit\Framework\TestCase', 'assertStringContainsString')) {
|
if (method_exists(parent::class, 'assertStringContainsString')) {
|
||||||
parent::assertStringNotContainsString($needle, $haystack, $message);
|
parent::assertStringNotContainsString($needle, $haystack, $message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
parent::assertNotContains($needle, $haystack, $message);
|
parent::assertNotContains($needle, $haystack, $message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* assertRegExp() was deprecated in favor of assertMatchesRegularExpression().
|
||||||
|
*
|
||||||
|
* @param string $pattern
|
||||||
|
* @param string $string
|
||||||
|
* @param string $message
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public static function assertMatchesRegularExpression($pattern, $string, $message = '')
|
||||||
|
{
|
||||||
|
if (method_exists(parent::class, 'assertMatchesRegularExpression')) {
|
||||||
|
parent::assertMatchesRegularExpression($pattern, $string, $message);
|
||||||
|
} else {
|
||||||
|
parent::assertRegExp($pattern, $string, $message);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -131,7 +131,7 @@ abstract class TestCase extends PhpseclibTestCase
|
|||||||
/**
|
/**
|
||||||
* Produces all combinations of test values.
|
* Produces all combinations of test values.
|
||||||
*
|
*
|
||||||
* @return array
|
* @return list<array{string, string, array}>
|
||||||
*/
|
*/
|
||||||
public function continuousBufferBatteryCombos()
|
public function continuousBufferBatteryCombos()
|
||||||
{
|
{
|
||||||
@ -173,6 +173,16 @@ abstract class TestCase extends PhpseclibTestCase
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array<array{string, string, array}>
|
||||||
|
*/
|
||||||
|
public function continuousBufferBatteryCombosWithoutSingleCombos()
|
||||||
|
{
|
||||||
|
return array_filter($this->continuousBufferBatteryCombos(), function (array $continuousBufferBatteryCombo) {
|
||||||
|
return count($continuousBufferBatteryCombo[2]) > 1;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @dataProvider continuousBufferBatteryCombos
|
* @dataProvider continuousBufferBatteryCombos
|
||||||
*/
|
*/
|
||||||
@ -219,14 +229,10 @@ abstract class TestCase extends PhpseclibTestCase
|
|||||||
/**
|
/**
|
||||||
* Pretty much the same as testContinuousBufferBattery with the caveat that continuous mode is not enabled.
|
* Pretty much the same as testContinuousBufferBattery with the caveat that continuous mode is not enabled.
|
||||||
*
|
*
|
||||||
* @dataProvider continuousBufferBatteryCombos
|
* @dataProvider continuousBufferBatteryCombosWithoutSingleCombos
|
||||||
*/
|
*/
|
||||||
public function testNonContinuousBufferBattery($op, $mode, $test)
|
public function testNonContinuousBufferBattery($op, $mode, $test)
|
||||||
{
|
{
|
||||||
if (count($test) == 1) {
|
|
||||||
self::markTestSkipped('test is 1');
|
|
||||||
}
|
|
||||||
|
|
||||||
$iv = str_repeat('x', 16);
|
$iv = str_repeat('x', 16);
|
||||||
$key = str_repeat('a', 16);
|
$key = str_repeat('a', 16);
|
||||||
|
|
||||||
|
@ -23,17 +23,17 @@ class CreateKeyTest extends PhpseclibTestCase
|
|||||||
{
|
{
|
||||||
$dsa = DSA::createParameters();
|
$dsa = DSA::createParameters();
|
||||||
$this->assertInstanceOf(Parameters::class, $dsa);
|
$this->assertInstanceOf(Parameters::class, $dsa);
|
||||||
$this->assertRegexp('#BEGIN DSA PARAMETERS#', "$dsa");
|
$this->assertMatchesRegularExpression('#BEGIN DSA PARAMETERS#', "$dsa");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$dsa = DSA::createParameters(100, 100);
|
DSA::createParameters(100, 100);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$this->assertInstanceOf(\Exception::class, $e);
|
$this->assertInstanceOf(\Exception::class, $e);
|
||||||
}
|
}
|
||||||
|
|
||||||
$dsa = DSA::createParameters(512, 160);
|
$dsa = DSA::createParameters(512, 160);
|
||||||
$this->assertInstanceOf(Parameters::class, $dsa);
|
$this->assertInstanceOf(Parameters::class, $dsa);
|
||||||
$this->assertRegexp('#BEGIN DSA PARAMETERS#', "$dsa");
|
$this->assertMatchesRegularExpression('#BEGIN DSA PARAMETERS#', "$dsa");
|
||||||
|
|
||||||
return $dsa;
|
return $dsa;
|
||||||
}
|
}
|
||||||
|
@ -462,7 +462,7 @@ Private-MAC: 03e2cb74e1d67652fbad063d2ed0478f31bdf256
|
|||||||
PKCS1::setEncryptionAlgorithm('AES-256-CBC');
|
PKCS1::setEncryptionAlgorithm('AES-256-CBC');
|
||||||
$encryptedKey = $rsa->withPassword('demo')->toString('PKCS1');
|
$encryptedKey = $rsa->withPassword('demo')->toString('PKCS1');
|
||||||
|
|
||||||
$this->assertRegExp('#AES-256-CBC#', $encryptedKey);
|
$this->assertMatchesRegularExpression('#AES-256-CBC#', $encryptedKey);
|
||||||
|
|
||||||
$rsa = PublicKeyLoader::load($key, 'demo');
|
$rsa = PublicKeyLoader::load($key, 'demo');
|
||||||
$this->assertInstanceOf(PrivateKey::class, $rsa);
|
$this->assertInstanceOf(PrivateKey::class, $rsa);
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Bootstrapping File for phpseclib Test Suite
|
|
||||||
*
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
|
||||||
*/
|
|
||||||
|
|
||||||
date_default_timezone_set('UTC');
|
|
||||||
|
|
||||||
$loader_path = __DIR__ . '/../vendor/autoload.php';
|
|
||||||
if (!file_exists($loader_path)) {
|
|
||||||
exit(<<<EOF
|
|
||||||
Dependencies must be installed using composer:
|
|
||||||
php composer.phar install
|
|
||||||
See https://getcomposer.org for help with installing composer.
|
|
||||||
|
|
||||||
EOF
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
require $loader_path;
|
|
@ -18,6 +18,7 @@ foreach ($files as $file) {
|
|||||||
'~ function assertIsString\(\$actual, \$message = \'\'\)~' => ' function assertIsString($actual, string $message = \'\'): void',
|
'~ function assertIsString\(\$actual, \$message = \'\'\)~' => ' function assertIsString($actual, string $message = \'\'): void',
|
||||||
'~ function assertStringContainsString\(\$needle, \$haystack, \$message = \'\'\)~' => ' function assertStringContainsString(string $needle, string $haystack, string $message = \'\'): void',
|
'~ function assertStringContainsString\(\$needle, \$haystack, \$message = \'\'\)~' => ' function assertStringContainsString(string $needle, string $haystack, string $message = \'\'): void',
|
||||||
'~ function assertStringNotContainsString\(\$needle, \$haystack, \$message = \'\'\)~' => ' function assertStringNotContainsString(string $needle, string $haystack, string $message = \'\'): void',
|
'~ function assertStringNotContainsString\(\$needle, \$haystack, \$message = \'\'\)~' => ' function assertStringNotContainsString(string $needle, string $haystack, string $message = \'\'): void',
|
||||||
|
'~ function assertMatchesRegularExpression\(\$pattern, \$string, \$message = \'\'\)~' => ' function assertMatchesRegularExpression(string $pattern, string $string, string $message = \'\'): void',
|
||||||
];
|
];
|
||||||
$updatedFileContents = preg_replace(
|
$updatedFileContents = preg_replace(
|
||||||
array_keys($patternToReplacementMap),
|
array_keys($patternToReplacementMap),
|
||||||
|
@ -1,9 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<phpunit
|
<phpunit
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
bootstrap="bootstrap.php"
|
|
||||||
colors="true"
|
|
||||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
|
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
|
||||||
|
bootstrap="../vendor/autoload.php"
|
||||||
|
failOnWarning="true"
|
||||||
|
failOnRisky="true"
|
||||||
|
failOnIncomplete="true"
|
||||||
|
failOnEmptyTestSuite="true"
|
||||||
>
|
>
|
||||||
<testsuites>
|
<testsuites>
|
||||||
<testsuite name="phpseclib Unit Test Suite">
|
<testsuite name="phpseclib Unit Test Suite">
|
||||||
@ -18,4 +21,7 @@
|
|||||||
<directory>../phpseclib/</directory>
|
<directory>../phpseclib/</directory>
|
||||||
</include>
|
</include>
|
||||||
</coverage>
|
</coverage>
|
||||||
|
<php>
|
||||||
|
<ini name="date.timezone" value="UTC"/>
|
||||||
|
</php>
|
||||||
</phpunit>
|
</phpunit>
|
||||||
|
Loading…
Reference in New Issue
Block a user