mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
CS fixes
This commit is contained in:
parent
152694b574
commit
b7d770659b
175 changed files with 688 additions and 724 deletions
|
@ -4,7 +4,7 @@
|
|||
* This file is part of Composer.
|
||||
*
|
||||
* (c) Nils Adermann <naderman@naderman.de>
|
||||
* Jordi Boggiano <j.boggiano@seld.be>
|
||||
* Jordi Boggiano <j.boggiano@seld.be>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
|
@ -42,8 +42,8 @@ class PlatformRepositoryTest extends TestCase
|
|||
'PHP_VERSION' => '7.1.33',
|
||||
),
|
||||
array(
|
||||
'php' => '7.1.33'
|
||||
)
|
||||
'php' => '7.1.33',
|
||||
),
|
||||
),
|
||||
array(
|
||||
array(
|
||||
|
@ -121,14 +121,14 @@ class PlatformRepositoryTest extends TestCase
|
|||
$runtime
|
||||
->method('hasConstant')
|
||||
->willReturnMap(
|
||||
array_map(function($constant) {
|
||||
array_map(function ($constant) {
|
||||
return array($constant, null, true);
|
||||
}, array_keys($constants))
|
||||
);
|
||||
$runtime
|
||||
->method('getConstant')
|
||||
->willReturnMap(
|
||||
array_map(function($constant, $value) {
|
||||
array_map(function ($constant, $value) {
|
||||
return array($constant, null, $value);
|
||||
}, array_keys($constants), array_values($constants))
|
||||
);
|
||||
|
@ -197,7 +197,7 @@ Default heartbeats interval => 0',
|
|||
array(
|
||||
'lib-amqp-protocol' => '0.9.1',
|
||||
'lib-amqp-librabbitmq' => '0.9.0',
|
||||
)
|
||||
),
|
||||
),
|
||||
'bz2' => array(
|
||||
'bz2',
|
||||
|
@ -208,7 +208,7 @@ BZip2 Support => Enabled
|
|||
Stream Wrapper support => compress.bzip2://
|
||||
Stream Filter support => bzip2.decompress, bzip2.compress
|
||||
BZip2 Version => 1.0.5, 6-Sept-2010',
|
||||
array('lib-bz2' => '1.0.5')
|
||||
array('lib-bz2' => '1.0.5'),
|
||||
),
|
||||
'curl' => array(
|
||||
'curl',
|
||||
|
@ -250,7 +250,7 @@ curl.cainfo => no value => no value',
|
|||
'lib-curl-zlib' => '1.2.8',
|
||||
'lib-curl-libssh2' => '1.4.3',
|
||||
),
|
||||
array(array('curl_version', array(), array('version' => '2.0.0')))
|
||||
array(array('curl_version', array(), array('version' => '2.0.0'))),
|
||||
),
|
||||
|
||||
'curl: OpenSSL fips version' => array(
|
||||
|
@ -293,7 +293,7 @@ curl.cainfo => no value => no value',
|
|||
'lib-curl-zlib' => '1.2.8',
|
||||
'lib-curl-libssh2' => '1.4.3',
|
||||
),
|
||||
array(array('curl_version', array(), array('version' => '2.0.0')))
|
||||
array(array('curl_version', array(), array('version' => '2.0.0'))),
|
||||
),
|
||||
'curl: gnutls' => array(
|
||||
'curl',
|
||||
|
@ -328,7 +328,7 @@ ZLib Version => 1.2.3.4',
|
|||
'lib-curl-zlib' => '1.2.3.4',
|
||||
'lib-curl-gnutls' => array('2.12.14', array('lib-curl-openssl')),
|
||||
),
|
||||
array(array('curl_version', array(), array('version' => '7.22.0')))
|
||||
array(array('curl_version', array(), array('version' => '7.22.0'))),
|
||||
),
|
||||
'curl: NSS' => array(
|
||||
'curl',
|
||||
|
@ -363,7 +363,7 @@ libSSH Version => libssh2/1.4.1',
|
|||
'lib-curl-zlib' => '1.2.5',
|
||||
'lib-curl-libssh2' => '1.4.1',
|
||||
),
|
||||
array(array('curl_version', array(), array('version' => '7.24.0')))
|
||||
array(array('curl_version', array(), array('version' => '7.24.0'))),
|
||||
),
|
||||
'curl: libssh not libssh2' => array(
|
||||
'curl',
|
||||
|
@ -424,7 +424,7 @@ Default timezone => Europe/Berlin',
|
|||
array(
|
||||
'lib-date-timelib' => '2018.03',
|
||||
'lib-date-zoneinfo' => '2020.1',
|
||||
)
|
||||
),
|
||||
),
|
||||
'date: before timelib was extracted' => array(
|
||||
'date',
|
||||
|
@ -438,7 +438,7 @@ Default timezone => Europe/Amsterdam',
|
|||
array(
|
||||
'lib-date-zoneinfo' => '2013.2',
|
||||
'lib-date-timelib' => false,
|
||||
)
|
||||
),
|
||||
),
|
||||
'date: internal zoneinfo' => array(
|
||||
array('date', 'timezonedb'),
|
||||
|
@ -449,7 +449,7 @@ date/time support => enabled
|
|||
"Olson" Timezone Database Version => 2020.1
|
||||
Timezone Database => internal
|
||||
Default timezone => UTC',
|
||||
array('lib-date-zoneinfo' => '2020.1')
|
||||
array('lib-date-zoneinfo' => '2020.1'),
|
||||
),
|
||||
'date: external zoneinfo' => array(
|
||||
array('date', 'timezonedb'),
|
||||
|
@ -460,7 +460,7 @@ date/time support => enabled
|
|||
"Olson" Timezone Database Version => 2020.1
|
||||
Timezone Database => external
|
||||
Default timezone => UTC',
|
||||
array('lib-timezonedb-zoneinfo' => array('2020.1', array('lib-date-zoneinfo')))
|
||||
array('lib-timezonedb-zoneinfo' => array('2020.1', array('lib-date-zoneinfo'))),
|
||||
),
|
||||
'date: zoneinfo 0.system' => array(
|
||||
'date',
|
||||
|
@ -482,7 +482,7 @@ date.sunrise_zenith => 90.583333 => 90.583333',
|
|||
array(
|
||||
'lib-date-zoneinfo' => '0',
|
||||
'lib-date-timelib' => '2018.03',
|
||||
)
|
||||
),
|
||||
),
|
||||
'fileinfo' => array(
|
||||
'fileinfo',
|
||||
|
@ -491,7 +491,7 @@ fileinfo
|
|||
|
||||
fileinfo support => enabled
|
||||
libmagic => 537',
|
||||
array('lib-fileinfo-libmagic' => '537')
|
||||
array('lib-fileinfo-libmagic' => '537'),
|
||||
),
|
||||
'gd' => array(
|
||||
'gd',
|
||||
|
@ -522,7 +522,7 @@ gd.jpeg_ignore_warning => 1 => 1',
|
|||
'lib-gd-libpng' => '1.6.34',
|
||||
),
|
||||
array(),
|
||||
array(array('GD_VERSION', null, '1.2.3'))
|
||||
array(array('GD_VERSION', null, '1.2.3')),
|
||||
),
|
||||
'gd: libjpeg version variation' => array(
|
||||
'gd',
|
||||
|
@ -553,7 +553,7 @@ gd.jpeg_ignore_warning => 1 => 1',
|
|||
'lib-gd-libpng' => '1.6.35',
|
||||
),
|
||||
array(),
|
||||
array(array('GD_VERSION', null, '1.2.3'))
|
||||
array(array('GD_VERSION', null, '1.2.3')),
|
||||
),
|
||||
'gd: libxpm' => array(
|
||||
'gd',
|
||||
|
@ -588,21 +588,21 @@ gd.jpeg_ignore_warning => 1 => 1',
|
|||
'lib-gd-libxpm' => '3.4.11',
|
||||
),
|
||||
array(),
|
||||
array(array('GD_VERSION', null, '2.2.5'))
|
||||
array(array('GD_VERSION', null, '2.2.5')),
|
||||
),
|
||||
'iconv' => array(
|
||||
'iconv',
|
||||
null,
|
||||
array('lib-iconv' => '1.2.4'),
|
||||
array(),
|
||||
array(array('ICONV_VERSION', null, '1.2.4'))
|
||||
array(array('ICONV_VERSION', null, '1.2.4')),
|
||||
),
|
||||
'gmp' => array(
|
||||
'gmp',
|
||||
null,
|
||||
array('lib-gmp' => '6.1.0'),
|
||||
array(),
|
||||
array(array('GMP_VERSION', null, '6.1.0'))
|
||||
array(array('GMP_VERSION', null, '6.1.0')),
|
||||
),
|
||||
'intl' => array(
|
||||
'intl',
|
||||
|
@ -633,7 +633,7 @@ intl.use_exceptions => 0 => 0',
|
|||
array(
|
||||
array('ResourceBundle'),
|
||||
array('IntlChar'),
|
||||
)
|
||||
),
|
||||
),
|
||||
'intl: INTL_ICU_VERSION not defined' => array(
|
||||
'intl',
|
||||
|
@ -652,7 +652,7 @@ ICU Data version => 57.1',
|
|||
array('lib-imagick-imagemagick' => array('6.2.9', array('lib-imagick'))),
|
||||
array(),
|
||||
array(),
|
||||
array(array('Imagick', array(), new ImagickStub('ImageMagick 6.2.9 Q16 x86_64 2018-05-18 http://www.imagemagick.org')))
|
||||
array(array('Imagick', array(), new ImagickStub('ImageMagick 6.2.9 Q16 x86_64 2018-05-18 http://www.imagemagick.org'))),
|
||||
),
|
||||
'imagick: 7.x' => array(
|
||||
'imagick',
|
||||
|
@ -660,7 +660,7 @@ ICU Data version => 57.1',
|
|||
array('lib-imagick-imagemagick' => array('7.0.8.34', array('lib-imagick'))),
|
||||
array(),
|
||||
array(),
|
||||
array(array('Imagick', array(), new ImagickStub('ImageMagick 7.0.8-34 Q16 x86_64 2019-03-23 https://imagemagick.org')))
|
||||
array(array('Imagick', array(), new ImagickStub('ImageMagick 7.0.8-34 Q16 x86_64 2019-03-23 https://imagemagick.org'))),
|
||||
),
|
||||
'ldap' => array(
|
||||
'ldap',
|
||||
|
@ -677,21 +677,21 @@ SASL Support => Enabled
|
|||
|
||||
Directive => Local Value => Master Value
|
||||
ldap.max_links => Unlimited => Unlimited',
|
||||
array('lib-ldap-openldap' => '2.4.50')
|
||||
array('lib-ldap-openldap' => '2.4.50'),
|
||||
),
|
||||
'libxml' => array(
|
||||
'libxml',
|
||||
null,
|
||||
array('lib-libxml' => '2.1.5'),
|
||||
array(),
|
||||
array(array('LIBXML_DOTTED_VERSION', null, '2.1.5'))
|
||||
array(array('LIBXML_DOTTED_VERSION', null, '2.1.5')),
|
||||
),
|
||||
'libxml: related extensions' => array(
|
||||
array('libxml', 'dom', 'simplexml', 'xml', 'xmlreader', 'xmlwriter'),
|
||||
null,
|
||||
array('lib-libxml' => array('2.1.5', array(), array('lib-dom-libxml', 'lib-simplexml-libxml', 'lib-xml-libxml', 'lib-xmlreader-libxml', 'lib-xmlwriter-libxml'))),
|
||||
array(),
|
||||
array(array('LIBXML_DOTTED_VERSION', null, '2.1.5'))
|
||||
array(array('LIBXML_DOTTED_VERSION', null, '2.1.5')),
|
||||
),
|
||||
'mbstring' => array(
|
||||
'mbstring',
|
||||
|
@ -712,7 +712,7 @@ Multibyte regex (oniguruma) version => 6.1.3',
|
|||
'lib-mbstring-oniguruma' => '7.0.0',
|
||||
),
|
||||
array(),
|
||||
array(array('MB_ONIGURUMA_VERSION', null, '7.0.0'))
|
||||
array(array('MB_ONIGURUMA_VERSION', null, '7.0.0')),
|
||||
),
|
||||
'mbstring: no MB_ONIGURUMA constant' => array(
|
||||
'mbstring',
|
||||
|
@ -731,7 +731,7 @@ Multibyte regex (oniguruma) version => 6.1.3',
|
|||
array(
|
||||
'lib-mbstring-libmbfl' => '1.3.2',
|
||||
'lib-mbstring-oniguruma' => '6.1.3',
|
||||
)
|
||||
),
|
||||
),
|
||||
'mbstring: no MB_ONIGURUMA constant <7.40' => array(
|
||||
'mbstring',
|
||||
|
@ -766,63 +766,63 @@ Session support => yes
|
|||
igbinary support => yes
|
||||
json support => yes
|
||||
msgpack support => yes',
|
||||
array('lib-memcached-libmemcached' => '1.0.18')
|
||||
array('lib-memcached-libmemcached' => '1.0.18'),
|
||||
),
|
||||
'openssl' => array(
|
||||
'openssl',
|
||||
null,
|
||||
array('lib-openssl' => '1.1.1.7'),
|
||||
array(),
|
||||
array(array('OPENSSL_VERSION_TEXT', null, 'OpenSSL 1.1.1g 21 Apr 2020'))
|
||||
array(array('OPENSSL_VERSION_TEXT', null, 'OpenSSL 1.1.1g 21 Apr 2020')),
|
||||
),
|
||||
'openssl: two letters suffix' => array(
|
||||
'openssl',
|
||||
null,
|
||||
array('lib-openssl' => '0.9.8.33'),
|
||||
array(),
|
||||
array(array('OPENSSL_VERSION_TEXT', null, 'OpenSSL 0.9.8zg 21 Apr 2020'))
|
||||
array(array('OPENSSL_VERSION_TEXT', null, 'OpenSSL 0.9.8zg 21 Apr 2020')),
|
||||
),
|
||||
'openssl: pre release is treated as alpha' => array(
|
||||
'openssl',
|
||||
null,
|
||||
array('lib-openssl' => '1.1.1.7-alpha1'),
|
||||
array(),
|
||||
array(array('OPENSSL_VERSION_TEXT', null, 'OpenSSL 1.1.1g-pre1 21 Apr 2020'))
|
||||
array(array('OPENSSL_VERSION_TEXT', null, 'OpenSSL 1.1.1g-pre1 21 Apr 2020')),
|
||||
),
|
||||
'openssl: beta release' => array(
|
||||
'openssl',
|
||||
null,
|
||||
array('lib-openssl' => '1.1.1.7-beta2'),
|
||||
array(),
|
||||
array(array('OPENSSL_VERSION_TEXT', null, 'OpenSSL 1.1.1g-beta2 21 Apr 2020'))
|
||||
array(array('OPENSSL_VERSION_TEXT', null, 'OpenSSL 1.1.1g-beta2 21 Apr 2020')),
|
||||
),
|
||||
'openssl: alpha release' => array(
|
||||
'openssl',
|
||||
null,
|
||||
array('lib-openssl' => '1.1.1.7-alpha4'),
|
||||
array(),
|
||||
array(array('OPENSSL_VERSION_TEXT', null, 'OpenSSL 1.1.1g-alpha4 21 Apr 2020'))
|
||||
array(array('OPENSSL_VERSION_TEXT', null, 'OpenSSL 1.1.1g-alpha4 21 Apr 2020')),
|
||||
),
|
||||
'openssl: rc release' => array(
|
||||
'openssl',
|
||||
null,
|
||||
array('lib-openssl' => '1.1.1.7-rc2'),
|
||||
array(),
|
||||
array(array('OPENSSL_VERSION_TEXT', null, 'OpenSSL 1.1.1g-rc2 21 Apr 2020'))
|
||||
array(array('OPENSSL_VERSION_TEXT', null, 'OpenSSL 1.1.1g-rc2 21 Apr 2020')),
|
||||
),
|
||||
'openssl: fips' => array(
|
||||
'openssl',
|
||||
null,
|
||||
array('lib-openssl-fips' => array('1.1.1.7', array(), array('lib-openssl'))),
|
||||
array(),
|
||||
array(array('OPENSSL_VERSION_TEXT', null, 'OpenSSL 1.1.1g-fips 21 Apr 2020'))
|
||||
array(array('OPENSSL_VERSION_TEXT', null, 'OpenSSL 1.1.1g-fips 21 Apr 2020')),
|
||||
),
|
||||
'openssl: LibreSSL' => array(
|
||||
'openssl',
|
||||
null,
|
||||
array('lib-openssl' => '2.0.1.0'),
|
||||
array(),
|
||||
array(array('OPENSSL_VERSION_TEXT', null, 'LibreSSL 2.0.1'))
|
||||
array(array('OPENSSL_VERSION_TEXT', null, 'LibreSSL 2.0.1')),
|
||||
),
|
||||
'mysqlnd' => array(
|
||||
'mysqlnd',
|
||||
|
@ -842,7 +842,7 @@ Collecting memory statistics => Yes
|
|||
Tracing => n/a
|
||||
Loaded plugins => mysqlnd,debug_trace,auth_plugin_mysql_native_password,auth_plugin_mysql_clear_password,auth_plugin_sha256_password
|
||||
API Extensions => pdo_mysql,mysqli',
|
||||
array('lib-mysqlnd-mysqlnd' => '5.0.11-dev')
|
||||
array('lib-mysqlnd-mysqlnd' => '5.0.11-dev'),
|
||||
),
|
||||
'pdo_mysql' => array(
|
||||
'pdo_mysql',
|
||||
|
@ -854,7 +854,7 @@ Client API version => mysqlnd 5.0.10-dev - 20150407 - $Id: 38fea24f2847fa7519001
|
|||
|
||||
Directive => Local Value => Master Value
|
||||
pdo_mysql.default_socket => /tmp/mysql.sock => /tmp/mysql.sock',
|
||||
array('lib-pdo_mysql-mysqlnd' => '5.0.10-dev')
|
||||
array('lib-pdo_mysql-mysqlnd' => '5.0.10-dev'),
|
||||
),
|
||||
'mongodb' => array(
|
||||
'mongodb',
|
||||
|
@ -882,7 +882,7 @@ mongodb.debug => no value => no value',
|
|||
array(
|
||||
'lib-mongodb-libmongoc' => '1.15.2',
|
||||
'lib-mongodb-libbson' => '1.15.2',
|
||||
)
|
||||
),
|
||||
),
|
||||
'pcre' => array(
|
||||
'pcre',
|
||||
|
@ -899,7 +899,7 @@ PCRE JIT Target => x86 64bit (little endian + unaligned)',
|
|||
'lib-pcre-unicode' => '11.0.0',
|
||||
),
|
||||
array(),
|
||||
array(array('PCRE_VERSION', null, '10.33 2019-04-16'))
|
||||
array(array('PCRE_VERSION', null, '10.33 2019-04-16')),
|
||||
),
|
||||
'pcre: no unicode version included' => array(
|
||||
'pcre',
|
||||
|
@ -917,7 +917,7 @@ pcre.recursion_limit => 100000 => 100000
|
|||
'lib-pcre' => '8.38',
|
||||
),
|
||||
array(),
|
||||
array(array('PCRE_VERSION', null, '8.38 2015-11-23'))
|
||||
array(array('PCRE_VERSION', null, '8.38 2015-11-23')),
|
||||
),
|
||||
'pgsql' => array(
|
||||
'pgsql',
|
||||
|
@ -939,7 +939,7 @@ pgsql.max_links => Unlimited => Unlimited
|
|||
pgsql.auto_reset_persistent => Off => Off
|
||||
pgsql.ignore_notice => Off => Off
|
||||
pgsql.log_notice => Off => Off',
|
||||
array('lib-pgsql-libpq' => '12.2')
|
||||
array('lib-pgsql-libpq' => '12.2'),
|
||||
),
|
||||
'pdo_pgsql' => array(
|
||||
'pdo_pgsql',
|
||||
|
@ -950,21 +950,21 @@ PDO Driver for PostgreSQL => enabled
|
|||
PostgreSQL(libpq) Version => 12.1
|
||||
Module version => 7.1.33
|
||||
Revision => $Id: 9c5f356c77143981d2e905e276e439501fe0f419 $',
|
||||
array('lib-pdo_pgsql-libpq' => '12.1')
|
||||
array('lib-pdo_pgsql-libpq' => '12.1'),
|
||||
),
|
||||
'libsodium' => array(
|
||||
'libsodium',
|
||||
null,
|
||||
array('lib-libsodium' => '1.0.17'),
|
||||
array(),
|
||||
array(array('SODIUM_LIBRARY_VERSION', null, '1.0.17'))
|
||||
array(array('SODIUM_LIBRARY_VERSION', null, '1.0.17')),
|
||||
),
|
||||
'libsodium: different extension name' => array(
|
||||
'sodium',
|
||||
null,
|
||||
array('lib-libsodium' => '1.0.15'),
|
||||
array(),
|
||||
array(array('SODIUM_LIBRARY_VERSION', null, '1.0.15'))
|
||||
array(array('SODIUM_LIBRARY_VERSION', null, '1.0.15')),
|
||||
),
|
||||
'pdo_sqlite' => array(
|
||||
'pdo_sqlite',
|
||||
|
@ -974,7 +974,7 @@ pdo_sqlite
|
|||
PDO Driver for SQLite 3.x => enabled
|
||||
SQLite Library => 3.32.3
|
||||
',
|
||||
array('lib-pdo_sqlite-sqlite' => '3.32.3')
|
||||
array('lib-pdo_sqlite-sqlite' => '3.32.3'),
|
||||
),
|
||||
'sqlite3' => array(
|
||||
'sqlite3',
|
||||
|
@ -988,7 +988,7 @@ SQLite Library => 3.31.0
|
|||
Directive => Local Value => Master Value
|
||||
sqlite3.extension_dir => no value => no value
|
||||
sqlite3.defensive => 1 => 1',
|
||||
array('lib-sqlite3-sqlite' => '3.31.0')
|
||||
array('lib-sqlite3-sqlite' => '3.31.0'),
|
||||
),
|
||||
'ssh2' => array(
|
||||
'ssh2',
|
||||
|
@ -999,7 +999,7 @@ SSH2 support => enabled
|
|||
extension version => 1.2
|
||||
libssh2 version => 1.8.0
|
||||
banner => SSH-2.0-libssh2_1.8.0',
|
||||
array('lib-ssh2-libssh2' => '1.8.0')
|
||||
array('lib-ssh2-libssh2' => '1.8.0'),
|
||||
),
|
||||
'yaml' => array(
|
||||
'yaml',
|
||||
|
@ -1017,7 +1017,7 @@ yaml.decode_php => 0 => 0
|
|||
yaml.output_canonical => 0 => 0
|
||||
yaml.output_indent => 2 => 2
|
||||
yaml.output_width => 80 => 80',
|
||||
array('lib-yaml-libyaml' => '0.2.2')
|
||||
array('lib-yaml-libyaml' => '0.2.2'),
|
||||
),
|
||||
'xsl' => array(
|
||||
'xsl',
|
||||
|
@ -1034,7 +1034,7 @@ libexslt Version => 1.1.29',
|
|||
'lib-libxslt-libxml' => '2.9.8',
|
||||
),
|
||||
array(),
|
||||
array(array('LIBXSLT_DOTTED_VERSION', null, '1.1.29'))
|
||||
array(array('LIBXSLT_DOTTED_VERSION', null, '1.1.29')),
|
||||
),
|
||||
'zip' => array(
|
||||
'zip',
|
||||
|
@ -1068,11 +1068,11 @@ Linked Version => 1.2.11',
|
|||
/**
|
||||
* @dataProvider getLibraryTestCases
|
||||
*
|
||||
* @param string|string[] $extensions
|
||||
* @param string|null $info
|
||||
* @param string|string[] $extensions
|
||||
* @param string|null $info
|
||||
* @param array<string,string|false> $expectations
|
||||
* @param array<string,mixed> $functions
|
||||
* @param array<string,mixed> $constants
|
||||
* @param array<string,mixed> $functions
|
||||
* @param array<string,mixed> $constants
|
||||
* @param array<string,class-string> $classDefinitions
|
||||
*/
|
||||
public function testLibraryInformation(
|
||||
|
@ -1082,9 +1082,8 @@ Linked Version => 1.2.11',
|
|||
array $functions = array(),
|
||||
array $constants = array(),
|
||||
array $classDefinitions = array()
|
||||
)
|
||||
{
|
||||
$extensions = (array)$extensions;
|
||||
) {
|
||||
$extensions = (array) $extensions;
|
||||
|
||||
$extensionVersion = '100.200.300';
|
||||
|
||||
|
@ -1093,11 +1092,10 @@ Linked Version => 1.2.11',
|
|||
->method('getExtensions')
|
||||
->willReturn($extensions);
|
||||
|
||||
|
||||
$runtime
|
||||
->method('getExtensionVersion')
|
||||
->willReturnMap(
|
||||
array_map(function($extension) use ($extensionVersion) {
|
||||
array_map(function ($extension) use ($extensionVersion) {
|
||||
return array($extension, $extensionVersion);
|
||||
}, $extensions)
|
||||
);
|
||||
|
@ -1119,7 +1117,9 @@ Linked Version => 1.2.11',
|
|||
->method('hasConstant')
|
||||
->willReturnMap(
|
||||
array_map(
|
||||
function ($constantDefintion) { return array($constantDefintion[0], $constantDefintion[1], true); },
|
||||
function ($constantDefintion) {
|
||||
return array($constantDefintion[0], $constantDefintion[1], true);
|
||||
},
|
||||
$constants
|
||||
)
|
||||
);
|
||||
|
@ -1131,7 +1131,9 @@ Linked Version => 1.2.11',
|
|||
->method('hasClass')
|
||||
->willReturnMap(
|
||||
array_map(
|
||||
function ($classDefinition) { return array($classDefinition[0], true); },
|
||||
function ($classDefinition) {
|
||||
return array($classDefinition[0], true);
|
||||
},
|
||||
$classDefinitions
|
||||
)
|
||||
);
|
||||
|
@ -1142,25 +1144,28 @@ Linked Version => 1.2.11',
|
|||
$platformRepository = new PlatformRepository(array(), array(), $runtime);
|
||||
|
||||
$expectations = array_map(function ($expectation) {
|
||||
return array_replace(array(null, array(), array()), (array) $expectation);
|
||||
}, $expectations);
|
||||
return array_replace(array(null, array(), array()), (array) $expectation);
|
||||
}, $expectations);
|
||||
|
||||
$libraries = array_map(
|
||||
function ($package) {
|
||||
return $package['name'];
|
||||
}, array_filter(
|
||||
$platformRepository->search('lib', PlatformRepository::SEARCH_NAME),
|
||||
function ($package) {
|
||||
return strpos($package['name'], 'lib-') === 0;
|
||||
}
|
||||
)
|
||||
},
|
||||
array_filter(
|
||||
$platformRepository->search('lib', PlatformRepository::SEARCH_NAME),
|
||||
function ($package) {
|
||||
return strpos($package['name'], 'lib-') === 0;
|
||||
}
|
||||
)
|
||||
);
|
||||
$expectedLibraries = array_merge(array_keys(array_filter($expectations,function($expectation) { return $expectation[0] !== false; })));
|
||||
$expectedLibraries = array_merge(array_keys(array_filter($expectations, function ($expectation) {
|
||||
return $expectation[0] !== false;
|
||||
})));
|
||||
self::assertCount(count(array_filter($expectedLibraries)), $libraries, sprintf('Expected: %s, got %s', var_export($expectedLibraries, true), var_export($libraries, true)));
|
||||
|
||||
$expectations = array_merge($expectations, array_combine(array_map(function($extension) {
|
||||
return 'ext-'.$extension;
|
||||
}, $extensions), array_fill(0, count($extensions), array($extensionVersion, array(), array()))));
|
||||
$expectations = array_merge($expectations, array_combine(array_map(function ($extension) {
|
||||
return 'ext-'.$extension;
|
||||
}, $extensions), array_fill(0, count($extensions), array($extensionVersion, array(), array()))));
|
||||
|
||||
foreach ($expectations as $packageName => $expectation) {
|
||||
list($expectedVersion, $expectedReplaces, $expectedProvides) = $expectation;
|
||||
|
@ -1189,10 +1194,12 @@ Linked Version => 1.2.11',
|
|||
}
|
||||
}
|
||||
|
||||
class ResourceBundleStub {
|
||||
class ResourceBundleStub
|
||||
{
|
||||
const STUB_VERSION = '32.0.1';
|
||||
|
||||
public static function create($locale, $bundleName, $fallback) {
|
||||
public static function create($locale, $bundleName, $fallback)
|
||||
{
|
||||
Assert::assertSame(3, func_num_args());
|
||||
Assert::assertSame('root', $locale);
|
||||
Assert::assertSame('ICUDATA', $bundleName);
|
||||
|
@ -1201,7 +1208,8 @@ class ResourceBundleStub {
|
|||
return new self();
|
||||
}
|
||||
|
||||
public function get($field) {
|
||||
public function get($field)
|
||||
{
|
||||
Assert::assertSame(1, func_num_args());
|
||||
Assert::assertSame('Version', $field);
|
||||
|
||||
|
@ -1209,14 +1217,17 @@ class ResourceBundleStub {
|
|||
}
|
||||
}
|
||||
|
||||
class ImagickStub {
|
||||
class ImagickStub
|
||||
{
|
||||
private $versionString;
|
||||
|
||||
public function __construct($versionString) {
|
||||
public function __construct($versionString)
|
||||
{
|
||||
$this->versionString = $versionString;
|
||||
}
|
||||
|
||||
public function getVersion() {
|
||||
public function getVersion()
|
||||
{
|
||||
Assert::assertSame(0, func_num_args());
|
||||
|
||||
return array('versionString' => $this->versionString);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue