Merge branch 'master' into 2.0

main
Jordi Boggiano 4 years ago
commit 45ecbae8f5
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC

@ -25,18 +25,17 @@ matrix:
- php: 7.1 - php: 7.1
- php: 7.2 - php: 7.2
- php: 7.3 - php: 7.3
- php: 7.4
env: env:
- deps=high - deps=high
- PHPSTAN=1 - SYMFONY_PHPUNIT_VERSION=7.5
- php: 7.3 - php: 7.4
env: env:
- deps=high - deps=high
- php: nightly - PHPSTAN=1
- php: 7.4snapshot
fast_finish: true fast_finish: true
allow_failures: allow_failures:
- php: nightly - php: nightly
- php: 7.4snapshot
before_install: before_install:
# disable Xdebug if available # disable Xdebug if available
@ -62,8 +61,7 @@ before_script:
- git config --global user.email travis@example.com - git config --global user.email travis@example.com
script: script:
# run test suite directories in parallel using GNU parallel - ./vendor/bin/simple-phpunit
- ls -d tests/Composer/Test/* | grep -v TestCase.php | parallel --gnu --keep-order 'echo "Running {} tests"; ./vendor/bin/phpunit -c tests/complete.phpunit.xml --colors=always {} || (echo -e "\e[41mFAILED\e[0m {}" && exit 1);'
# Run PHPStan # Run PHPStan
- if [[ $PHPSTAN == "1" ]]; then - if [[ $PHPSTAN == "1" ]]; then
bin/composer require --dev phpstan/phpstan:^0.12 && bin/composer require --dev phpstan/phpstan:^0.12 &&
@ -81,4 +79,4 @@ deploy:
on: on:
tags: true tags: true
repo: composer/composer repo: composer/composer
php: '7.2' php: '7.3'

@ -11,11 +11,14 @@
* Added debug info about HTTP authentications * Added debug info about HTTP authentications
* Added Symfony 5 compatibility * Added Symfony 5 compatibility
* Added --fixed flag to require command to make it use a fixed constraint instead of a ^x.y constraint when adding the requirement * Added --fixed flag to require command to make it use a fixed constraint instead of a ^x.y constraint when adding the requirement
* Fixed GitHub deprecation of access_token query parameter, now using Authorization header
* Fixed archive command to persist file permissions inside the zip files * Fixed archive command to persist file permissions inside the zip files
* Fixed init/require command to avoid suggesting packages which are already selected in the search results * Fixed init/require command to avoid suggesting packages which are already selected in the search results
* Fixed create-project UX issues * Fixed create-project UX issues
### [1.9.3] 2020-02-04
* Fixed GitHub deprecation of access_token query parameter, now using Authorization header
### [1.9.2] 2020-01-14 ### [1.9.2] 2020-01-14
* Fixed minor git driver bugs * Fixed minor git driver bugs
@ -801,7 +804,8 @@
* Initial release * Initial release
[1.10.0]: https://github.com/composer/composer/compare/1.9.2...1.10.0 [1.10.0]: https://github.com/composer/composer/compare/1.9.3...1.10.0
[1.9.3]: https://github.com/composer/composer/compare/1.9.2...1.9.3
[1.9.2]: https://github.com/composer/composer/compare/1.9.1...1.9.2 [1.9.2]: https://github.com/composer/composer/compare/1.9.1...1.9.2
[1.9.1]: https://github.com/composer/composer/compare/1.9.0...1.9.1 [1.9.1]: https://github.com/composer/composer/compare/1.9.0...1.9.1
[1.9.0]: https://github.com/composer/composer/compare/1.8.6...1.9.0 [1.9.0]: https://github.com/composer/composer/compare/1.8.6...1.9.0

@ -30,4 +30,4 @@ install:
test_script: test_script:
- cd %APPVEYOR_BUILD_FOLDER% - cd %APPVEYOR_BUILD_FOLDER%
- vendor\bin\phpunit --colors=always - vendor\bin\simple-phpunit --colors=always

@ -41,8 +41,8 @@
"symfony/console": "2.8.38" "symfony/console": "2.8.38"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^4.8.35 || ^5.7", "symfony/phpunit-bridge": "^3.4",
"phpunit/phpunit-mock-objects": "^2.3 || ^3.0" "phpspec/prophecy": "^1.10"
}, },
"suggest": { "suggest": {
"ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages", "ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages",
@ -79,7 +79,7 @@
], ],
"scripts": { "scripts": {
"compile": "@php -dphar.readonly=0 bin/compile", "compile": "@php -dphar.readonly=0 bin/compile",
"test": "phpunit" "test": "simple-phpunit"
}, },
"scripts-descriptions": { "scripts-descriptions": {
"compile": "Compile composer.phar", "compile": "Compile composer.phar",

694
composer.lock generated

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "7fb7edae7611d2e07d946d75b9cf2c63", "content-hash": "7bfefa6f7d4d8c18836028dae680bd4f",
"packages": [ "packages": [
{ {
"name": "composer/ca-bundle", "name": "composer/ca-bundle",
@ -45,6 +45,13 @@
"license": [ "license": [
"MIT" "MIT"
], ],
"authors": [
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "http://seld.be"
}
],
"description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.", "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.",
"keywords": [ "keywords": [
"cabundle", "cabundle",
@ -90,6 +97,23 @@
"license": [ "license": [
"MIT" "MIT"
], ],
"authors": [
{
"name": "Nils Adermann",
"email": "naderman@naderman.de",
"homepage": "http://www.naderman.de"
},
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "http://seld.be"
},
{
"name": "Rob Bast",
"email": "rob.bast@gmail.com",
"homepage": "http://robbast.nl"
}
],
"description": "Semver library that offers utilities, version constraint parsing and validation.", "description": "Semver library that offers utilities, version constraint parsing and validation.",
"keywords": [ "keywords": [
"semantic", "semantic",
@ -134,7 +158,29 @@
"license": [ "license": [
"MIT" "MIT"
], ],
"authors": [
{
"name": "Nils Adermann",
"email": "naderman@naderman.de",
"homepage": "http://www.naderman.de"
},
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "http://seld.be"
},
{
"name": "Rob Bast",
"email": "rob.bast@gmail.com",
"homepage": "http://robbast.nl"
}
],
"description": "SPDX licenses list and validation library.", "description": "SPDX licenses list and validation library.",
"keywords": [
"license",
"spdx",
"validator"
],
"time": "2019-07-29T10:31:59+00:00" "time": "2019-07-29T10:31:59+00:00"
}, },
{ {
@ -341,6 +387,12 @@
"license": [ "license": [
"MIT" "MIT"
], ],
"authors": [
{
"name": "Jan Sorgalla",
"email": "jsorgalla@gmail.com"
}
],
"description": "A lightweight implementation of CommonJS Promises/A for PHP", "description": "A lightweight implementation of CommonJS Promises/A for PHP",
"time": "2016-03-07T13:46:50+00:00" "time": "2016-03-07T13:46:50+00:00"
}, },
@ -429,6 +481,12 @@
"license": [ "license": [
"MIT" "MIT"
], ],
"authors": [
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be"
}
],
"description": "PHAR file format utilities, for when PHP phars you up", "description": "PHAR file format utilities, for when PHP phars you up",
"keywords": [ "keywords": [
"phra" "phra"
@ -750,6 +808,16 @@
"license": [ "license": [
"MIT" "MIT"
], ],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill for the Mbstring extension", "description": "Symfony polyfill for the Mbstring extension",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"keywords": [ "keywords": [
@ -918,33 +986,33 @@
}, },
{ {
"name": "phpspec/prophecy", "name": "phpspec/prophecy",
"version": "1.9.0", "version": "v1.10.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpspec/prophecy.git", "url": "https://github.com/phpspec/prophecy.git",
"reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203" "reference": "b4400efc9d206e83138e2bb97ed7f5b14b831cd9"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/f6811d96d97bdf400077a0cc100ae56aa32b9203", "url": "https://api.github.com/repos/phpspec/prophecy/zipball/b4400efc9d206e83138e2bb97ed7f5b14b831cd9",
"reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203", "reference": "b4400efc9d206e83138e2bb97ed7f5b14b831cd9",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"doctrine/instantiator": "^1.0.2", "doctrine/instantiator": "^1.0.2",
"php": "^5.3|^7.0", "php": "^5.3|^7.0",
"phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0",
"sebastian/comparator": "^1.1|^2.0|^3.0", "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0",
"sebastian/recursion-context": "^1.0|^2.0|^3.0" "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0"
}, },
"require-dev": { "require-dev": {
"phpspec/phpspec": "^2.5|^3.2", "phpspec/phpspec": "^2.5 || ^3.2",
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.8.x-dev" "dev-master": "1.10.x-dev"
} }
}, },
"autoload": { "autoload": {
@ -956,344 +1024,28 @@
"license": [ "license": [
"MIT" "MIT"
], ],
"description": "Highly opinionated mocking framework for PHP 5.3+",
"homepage": "https://github.com/phpspec/prophecy",
"time": "2019-10-03T11:07:50+00:00"
},
{
"name": "phpunit/php-code-coverage",
"version": "2.2.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979",
"reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"phpunit/php-file-iterator": "~1.3",
"phpunit/php-text-template": "~1.2",
"phpunit/php-token-stream": "~1.3",
"sebastian/environment": "^1.3.2",
"sebastian/version": "~1.0"
},
"require-dev": {
"ext-xdebug": ">=2.1.4",
"phpunit/phpunit": "~4"
},
"suggest": {
"ext-dom": "*",
"ext-xdebug": ">=2.2.1",
"ext-xmlwriter": "*"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.2.x-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [ "authors": [
{ {
"name": "Sebastian Bergmann", "name": "Konstantin Kudryashov",
"email": "sb@sebastian-bergmann.de", "email": "ever.zet@gmail.com",
"role": "lead" "homepage": "http://everzet.com"
} },
],
"description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
"homepage": "https://github.com/sebastianbergmann/php-code-coverage",
"keywords": [
"coverage",
"testing",
"xunit"
],
"support": {
"irc": "irc://irc.freenode.net/phpunit",
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/2.2"
},
"time": "2015-10-06T15:47:00+00:00"
},
{
"name": "phpunit/php-file-iterator",
"version": "1.4.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
"reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4",
"reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.4.x-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "FilterIterator implementation that filters files based on a list of suffixes.",
"homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
"time": "2017-11-27T13:52:08+00:00"
},
{
"name": "phpunit/php-text-template",
"version": "1.2.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-text-template.git",
"reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
"reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"type": "library",
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "Simple template engine.",
"homepage": "https://github.com/sebastianbergmann/php-text-template/",
"time": "2015-06-21T13:50:34+00:00"
},
{
"name": "phpunit/php-timer",
"version": "1.0.9",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-timer.git",
"reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f",
"reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f",
"shasum": ""
},
"require": {
"php": "^5.3.3 || ^7.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "Utility class for timing",
"homepage": "https://github.com/sebastianbergmann/php-timer/",
"time": "2017-02-26T11:10:40+00:00"
},
{
"name": "phpunit/php-token-stream",
"version": "1.4.12",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-token-stream.git",
"reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/1ce90ba27c42e4e44e6d8458241466380b51fa16",
"reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16",
"shasum": ""
},
"require": {
"ext-tokenizer": "*",
"php": ">=5.3.3"
},
"require-dev": {
"phpunit/phpunit": "~4.2"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.4-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "Wrapper around PHP's tokenizer extension.",
"homepage": "https://github.com/sebastianbergmann/php-token-stream/",
"time": "2017-12-04T08:55:13+00:00"
},
{
"name": "phpunit/phpunit",
"version": "4.8.36",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "46023de9a91eec7dfb06cc56cb4e260017298517"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/46023de9a91eec7dfb06cc56cb4e260017298517",
"reference": "46023de9a91eec7dfb06cc56cb4e260017298517",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-json": "*",
"ext-pcre": "*",
"ext-reflection": "*",
"ext-spl": "*",
"php": ">=5.3.3",
"phpspec/prophecy": "^1.3.1",
"phpunit/php-code-coverage": "~2.1",
"phpunit/php-file-iterator": "~1.4",
"phpunit/php-text-template": "~1.2",
"phpunit/php-timer": "^1.0.6",
"phpunit/phpunit-mock-objects": "~2.3",
"sebastian/comparator": "~1.2.2",
"sebastian/diff": "~1.2",
"sebastian/environment": "~1.3",
"sebastian/exporter": "~1.2",
"sebastian/global-state": "~1.0",
"sebastian/version": "~1.0",
"symfony/yaml": "~2.1|~3.0"
},
"suggest": {
"phpunit/php-invoker": "~1.1"
},
"bin": [
"phpunit"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.8.x-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{ {
"name": "Sebastian Bergmann", "name": "Marcello Duarte",
"email": "sebastian@phpunit.de", "email": "marcello.duarte@gmail.com"
"role": "lead"
} }
], ],
"description": "The PHP Unit Testing framework.", "description": "Highly opinionated mocking framework for PHP 5.3+",
"homepage": "https://phpunit.de/", "homepage": "https://github.com/phpspec/prophecy",
"keywords": [ "keywords": [
"phpunit", "Double",
"testing", "Dummy",
"xunit" "fake",
], "mock",
"support": { "spy",
"issues": "https://github.com/sebastianbergmann/phpunit/issues", "stub"
"source": "https://github.com/sebastianbergmann/phpunit/tree/4.8.36" ],
}, "time": "2020-01-20T15:57:02+00:00"
"time": "2017-06-21T08:07:12+00:00"
},
{
"name": "phpunit/phpunit-mock-objects",
"version": "2.3.8",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
"reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983",
"reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983",
"shasum": ""
},
"require": {
"doctrine/instantiator": "^1.0.2",
"php": ">=5.3.3",
"phpunit/php-text-template": "~1.2",
"sebastian/exporter": "~1.2"
},
"require-dev": {
"phpunit/phpunit": "~4.4"
},
"suggest": {
"ext-soap": "*"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.3.x-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "Mock Object library for PHPUnit",
"homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/",
"abandoned": true,
"time": "2015-10-02T06:51:40+00:00"
}, },
{ {
"name": "sebastian/comparator", "name": "sebastian/comparator",
@ -1332,8 +1084,31 @@
"license": [ "license": [
"BSD-3-Clause" "BSD-3-Clause"
], ],
"authors": [
{
"name": "Jeff Welch",
"email": "whatthejeff@gmail.com"
},
{
"name": "Volker Dusch",
"email": "github@wallbash.com"
},
{
"name": "Bernhard Schussek",
"email": "bschussek@2bepublished.at"
},
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
}
],
"description": "Provides the functionality to compare PHP values for equality", "description": "Provides the functionality to compare PHP values for equality",
"homepage": "http://www.github.com/sebastianbergmann/comparator", "homepage": "http://www.github.com/sebastianbergmann/comparator",
"keywords": [
"comparator",
"compare",
"equality"
],
"time": "2017-01-29T09:50:25+00:00" "time": "2017-01-29T09:50:25+00:00"
}, },
{ {
@ -1371,81 +1146,40 @@
"license": [ "license": [
"BSD-3-Clause" "BSD-3-Clause"
], ],
"description": "Diff implementation",
"homepage": "https://github.com/sebastianbergmann/diff",
"time": "2017-05-22T07:24:03+00:00"
},
{
"name": "sebastian/environment",
"version": "1.3.8",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
"reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea",
"reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea",
"shasum": ""
},
"require": {
"php": "^5.3.3 || ^7.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8 || ^5.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.3.x-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [ "authors": [
{
"name": "Kore Nordmann",
"email": "mail@kore-nordmann.de"
},
{ {
"name": "Sebastian Bergmann", "name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de" "email": "sebastian@phpunit.de"
} }
], ],
"description": "Provides functionality to handle HHVM/PHP environments", "description": "Diff implementation",
"homepage": "http://www.github.com/sebastianbergmann/environment", "homepage": "https://github.com/sebastianbergmann/diff",
"keywords": [ "keywords": [
"Xdebug", "diff"
"environment",
"hhvm"
], ],
"support": { "time": "2017-05-22T07:24:03+00:00"
"issues": "https://github.com/sebastianbergmann/environment/issues",
"source": "https://github.com/sebastianbergmann/environment/tree/1.3"
},
"time": "2016-08-18T05:49:44+00:00"
}, },
{ {
"name": "sebastian/exporter", "name": "sebastian/exporter",
"version": "1.2.2", "version": "2.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git", "url": "https://github.com/sebastianbergmann/exporter.git",
"reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4",
"reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.3", "php": ">=5.3.3",
"sebastian/recursion-context": "~1.0" "sebastian/recursion-context": "~2.0"
}, },
"require-dev": { "require-dev": {
"ext-mbstring": "*", "ext-mbstring": "*",
@ -1454,7 +1188,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.3.x-dev" "dev-master": "2.0.x-dev"
} }
}, },
"autoload": { "autoload": {
@ -1466,64 +1200,48 @@
"license": [ "license": [
"BSD-3-Clause" "BSD-3-Clause"
], ],
"authors": [
{
"name": "Jeff Welch",
"email": "whatthejeff@gmail.com"
},
{
"name": "Volker Dusch",
"email": "github@wallbash.com"
},
{
"name": "Bernhard Schussek",
"email": "bschussek@2bepublished.at"
},
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
},
{
"name": "Adam Harvey",
"email": "aharvey@php.net"
}
],
"description": "Provides the functionality to export PHP variables for visualization", "description": "Provides the functionality to export PHP variables for visualization",
"homepage": "http://www.github.com/sebastianbergmann/exporter", "homepage": "http://www.github.com/sebastianbergmann/exporter",
"time": "2016-06-17T09:04:28+00:00" "keywords": [
}, "export",
{ "exporter"
"name": "sebastian/global-state",
"version": "1.1.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/global-state.git",
"reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4",
"reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"require-dev": {
"phpunit/phpunit": "~4.2"
},
"suggest": {
"ext-uopz": "*"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
], ],
"description": "Snapshotting of global state", "time": "2016-11-19T08:54:04+00:00"
"homepage": "http://www.github.com/sebastianbergmann/global-state",
"time": "2015-10-12T03:26:01+00:00"
}, },
{ {
"name": "sebastian/recursion-context", "name": "sebastian/recursion-context",
"version": "1.0.5", "version": "2.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/recursion-context.git", "url": "https://github.com/sebastianbergmann/recursion-context.git",
"reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7" "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b19cc3298482a335a95f3016d2f8a6950f0fbcd7", "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/2c3ba150cbec723aa057506e73a8d33bdb286c9a",
"reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7", "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1535,7 +1253,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.0.x-dev" "dev-master": "2.0.x-dev"
} }
}, },
"autoload": { "autoload": {
@ -1547,65 +1265,66 @@
"license": [ "license": [
"BSD-3-Clause" "BSD-3-Clause"
], ],
"authors": [
{
"name": "Jeff Welch",
"email": "whatthejeff@gmail.com"
},
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
},
{
"name": "Adam Harvey",
"email": "aharvey@php.net"
}
],
"description": "Provides functionality to recursively process PHP variables", "description": "Provides functionality to recursively process PHP variables",
"homepage": "http://www.github.com/sebastianbergmann/recursion-context", "homepage": "http://www.github.com/sebastianbergmann/recursion-context",
"time": "2016-10-03T07:41:43+00:00" "time": "2016-11-19T07:33:16+00:00"
}, },
{ {
"name": "sebastian/version", "name": "symfony/phpunit-bridge",
"version": "1.0.6", "version": "v3.4.37",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/version.git", "url": "https://github.com/symfony/phpunit-bridge.git",
"reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" "reference": "ebfd1b428ffc14306e843092763f228bfba168d0"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/ebfd1b428ffc14306e843092763f228bfba168d0",
"reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", "reference": "ebfd1b428ffc14306e843092763f228bfba168d0",
"shasum": "" "shasum": ""
}, },
"type": "library", "require": {
"autoload": { "php": ">=5.3.3"
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "Library that helps with managing the version number of Git-hosted PHP projects",
"homepage": "https://github.com/sebastianbergmann/version",
"time": "2015-06-21T13:59:46+00:00"
},
{
"name": "symfony/yaml",
"version": "v2.8.52",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "02c1859112aa779d9ab394ae4f3381911d84052b"
}, },
"dist": { "conflict": {
"type": "zip", "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0"
"url": "https://api.github.com/repos/symfony/yaml/zipball/02c1859112aa779d9ab394ae4f3381911d84052b",
"reference": "02c1859112aa779d9ab394ae4f3381911d84052b",
"shasum": ""
}, },
"require": { "suggest": {
"php": ">=5.3.9", "symfony/debug": "For tracking deprecated interfaces usages at runtime with DebugClassLoader"
"symfony/polyfill-ctype": "~1.8"
}, },
"type": "library", "bin": [
"bin/simple-phpunit"
],
"type": "symfony-bridge",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "2.8-dev" "dev-master": "3.4-dev"
},
"thanks": {
"name": "phpunit/phpunit",
"url": "https://github.com/sebastianbergmann/phpunit"
} }
}, },
"autoload": { "autoload": {
"files": [
"bootstrap.php"
],
"psr-4": { "psr-4": {
"Symfony\\Component\\Yaml\\": "" "Symfony\\Bridge\\PhpUnit\\": ""
}, },
"exclude-from-classmap": [ "exclude-from-classmap": [
"/Tests/" "/Tests/"
@ -1617,20 +1336,17 @@
], ],
"authors": [ "authors": [
{ {
"name": "Fabien Potencier", "name": "Nicolas Grekas",
"email": "fabien@symfony.com" "email": "p@tchwork.com"
}, },
{ {
"name": "Symfony Community", "name": "Symfony Community",
"homepage": "https://symfony.com/contributors" "homepage": "https://symfony.com/contributors"
} }
], ],
"description": "Symfony Yaml Component", "description": "Symfony PHPUnit Bridge",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "time": "2020-01-14T14:27:59+00:00"
"source": "https://github.com/symfony/yaml/tree/v2.8.52"
},
"time": "2018-11-11T11:18:13+00:00"
} }
], ],
"aliases": [], "aliases": [],

@ -8,10 +8,14 @@
convertErrorsToExceptions="true" convertErrorsToExceptions="true"
convertNoticesToExceptions="true" convertNoticesToExceptions="true"
convertWarningsToExceptions="true" convertWarningsToExceptions="true"
strict="false"
processIsolation="false" processIsolation="false"
stopOnFailure="false" stopOnFailure="false"
bootstrap="tests/bootstrap.php" bootstrap="tests/bootstrap.php"
> >
<php>
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak"/>
</php>
<testsuites> <testsuites>
<testsuite name="Composer Test Suite"> <testsuite name="Composer Test Suite">
<directory>./tests/Composer/</directory> <directory>./tests/Composer/</directory>

@ -247,13 +247,13 @@ class Installer
return $res; return $res;
} }
} catch (\Exception $e) { } catch (\Exception $e) {
if ($this->executeOperations) { if ($this->executeOperations && $this->config->get('notify-on-install')) {
$this->installationManager->notifyInstalls($this->io); $this->installationManager->notifyInstalls($this->io);
} }
throw $e; throw $e;
} }
if ($this->executeOperations) { if ($this->executeOperations && $this->config->get('notify-on-install')) {
$this->installationManager->notifyInstalls($this->io); $this->installationManager->notifyInstalls($this->io);
} }

@ -351,10 +351,10 @@ class AutoloadGeneratorTest extends TestCase
file_put_contents($this->workingDir.'/bar.php', '<?php class FilesBar {}'); file_put_contents($this->workingDir.'/bar.php', '<?php class FilesBar {}');
$this->generator->dump($this->config, $this->repository, $package, $this->im, 'composer', false, 'TargetDir'); $this->generator->dump($this->config, $this->repository, $package, $this->im, 'composer', false, 'TargetDir');
$this->assertFileEquals(__DIR__.'/Fixtures/autoload_target_dir.php', $this->vendorDir.'/autoload.php'); $this->assertFileContentEquals(__DIR__.'/Fixtures/autoload_target_dir.php', $this->vendorDir.'/autoload.php');
$this->assertFileEquals(__DIR__.'/Fixtures/autoload_real_target_dir.php', $this->vendorDir.'/composer/autoload_real.php'); $this->assertFileContentEquals(__DIR__.'/Fixtures/autoload_real_target_dir.php', $this->vendorDir.'/composer/autoload_real.php');
$this->assertFileEquals(__DIR__.'/Fixtures/autoload_static_target_dir.php', $this->vendorDir.'/composer/autoload_static.php'); $this->assertFileContentEquals(__DIR__.'/Fixtures/autoload_static_target_dir.php', $this->vendorDir.'/composer/autoload_static.php');
$this->assertFileEquals(__DIR__.'/Fixtures/autoload_files_target_dir.php', $this->vendorDir.'/composer/autoload_files.php'); $this->assertFileContentEquals(__DIR__.'/Fixtures/autoload_files_target_dir.php', $this->vendorDir.'/composer/autoload_files.php');
$this->assertAutoloadFiles('classmap6', $this->vendorDir.'/composer', 'classmap'); $this->assertAutoloadFiles('classmap6', $this->vendorDir.'/composer', 'classmap');
} }
@ -793,10 +793,10 @@ EOF;
file_put_contents($this->workingDir.'/root.php', '<?php function testFilesAutoloadGenerationRoot() {}'); file_put_contents($this->workingDir.'/root.php', '<?php function testFilesAutoloadGenerationRoot() {}');
$this->generator->dump($this->config, $this->repository, $package, $this->im, 'composer', false, 'FilesAutoload'); $this->generator->dump($this->config, $this->repository, $package, $this->im, 'composer', false, 'FilesAutoload');
$this->assertFileEquals(__DIR__.'/Fixtures/autoload_functions.php', $this->vendorDir.'/autoload.php'); $this->assertFileContentEquals(__DIR__.'/Fixtures/autoload_functions.php', $this->vendorDir.'/autoload.php');
$this->assertFileEquals(__DIR__.'/Fixtures/autoload_real_functions.php', $this->vendorDir.'/composer/autoload_real.php'); $this->assertFileContentEquals(__DIR__.'/Fixtures/autoload_real_functions.php', $this->vendorDir.'/composer/autoload_real.php');
$this->assertFileEquals(__DIR__.'/Fixtures/autoload_static_functions.php', $this->vendorDir.'/composer/autoload_static.php'); $this->assertFileContentEquals(__DIR__.'/Fixtures/autoload_static_functions.php', $this->vendorDir.'/composer/autoload_static.php');
$this->assertFileEquals(__DIR__.'/Fixtures/autoload_files_functions.php', $this->vendorDir.'/composer/autoload_files.php'); $this->assertFileContentEquals(__DIR__.'/Fixtures/autoload_files_functions.php', $this->vendorDir.'/composer/autoload_files.php');
include $this->vendorDir . '/autoload.php'; include $this->vendorDir . '/autoload.php';
$this->assertTrue(function_exists('testFilesAutoloadGeneration1')); $this->assertTrue(function_exists('testFilesAutoloadGeneration1'));
@ -861,22 +861,22 @@ EOF;
file_put_contents($this->workingDir.'/root.php', '<?php function testFilesAutoloadGenerationRoot() {}'); file_put_contents($this->workingDir.'/root.php', '<?php function testFilesAutoloadGenerationRoot() {}');
$this->generator->dump($this->config, $this->repository, $autoloadPackage, $this->im, 'composer', false, 'FilesAutoload'); $this->generator->dump($this->config, $this->repository, $autoloadPackage, $this->im, 'composer', false, 'FilesAutoload');
$this->assertFileEquals(__DIR__.'/Fixtures/autoload_functions.php', $this->vendorDir.'/autoload.php'); $this->assertFileContentEquals(__DIR__.'/Fixtures/autoload_functions.php', $this->vendorDir.'/autoload.php');
$this->assertFileEquals(__DIR__.'/Fixtures/autoload_real_functions_with_include_paths.php', $this->vendorDir.'/composer/autoload_real.php'); $this->assertFileContentEquals(__DIR__.'/Fixtures/autoload_real_functions_with_include_paths.php', $this->vendorDir.'/composer/autoload_real.php');
$this->assertFileEquals(__DIR__.'/Fixtures/autoload_static_functions_with_include_paths.php', $this->vendorDir.'/composer/autoload_static.php'); $this->assertFileContentEquals(__DIR__.'/Fixtures/autoload_static_functions_with_include_paths.php', $this->vendorDir.'/composer/autoload_static.php');
$this->assertFileEquals(__DIR__.'/Fixtures/autoload_files_functions.php', $this->vendorDir.'/composer/autoload_files.php'); $this->assertFileContentEquals(__DIR__.'/Fixtures/autoload_files_functions.php', $this->vendorDir.'/composer/autoload_files.php');
$this->assertFileEquals(__DIR__.'/Fixtures/include_paths_functions.php', $this->vendorDir.'/composer/include_paths.php'); $this->assertFileContentEquals(__DIR__.'/Fixtures/include_paths_functions.php', $this->vendorDir.'/composer/include_paths.php');
$this->generator->dump($this->config, $this->repository, $autoloadPackage, $this->im, 'composer', false, 'FilesAutoload'); $this->generator->dump($this->config, $this->repository, $autoloadPackage, $this->im, 'composer', false, 'FilesAutoload');
$this->assertFileEquals(__DIR__.'/Fixtures/autoload_functions.php', $this->vendorDir.'/autoload.php'); $this->assertFileContentEquals(__DIR__.'/Fixtures/autoload_functions.php', $this->vendorDir.'/autoload.php');
$this->assertFileEquals(__DIR__.'/Fixtures/autoload_real_functions_with_include_paths.php', $this->vendorDir.'/composer/autoload_real.php'); $this->assertFileContentEquals(__DIR__.'/Fixtures/autoload_real_functions_with_include_paths.php', $this->vendorDir.'/composer/autoload_real.php');
$this->assertFileEquals(__DIR__.'/Fixtures/autoload_files_functions_with_removed_extra.php', $this->vendorDir.'/composer/autoload_files.php'); $this->assertFileContentEquals(__DIR__.'/Fixtures/autoload_files_functions_with_removed_extra.php', $this->vendorDir.'/composer/autoload_files.php');
$this->assertFileEquals(__DIR__.'/Fixtures/include_paths_functions_with_removed_extra.php', $this->vendorDir.'/composer/include_paths.php'); $this->assertFileContentEquals(__DIR__.'/Fixtures/include_paths_functions_with_removed_extra.php', $this->vendorDir.'/composer/include_paths.php');
$this->generator->dump($this->config, $this->repository, $notAutoloadPackage, $this->im, 'composer', false, 'FilesAutoload'); $this->generator->dump($this->config, $this->repository, $notAutoloadPackage, $this->im, 'composer', false, 'FilesAutoload');
$this->assertFileEquals(__DIR__.'/Fixtures/autoload_functions.php', $this->vendorDir.'/autoload.php'); $this->assertFileContentEquals(__DIR__.'/Fixtures/autoload_functions.php', $this->vendorDir.'/autoload.php');
$this->assertFileEquals(__DIR__.'/Fixtures/autoload_real_functions_with_removed_include_paths_and_autolad_files.php', $this->vendorDir.'/composer/autoload_real.php'); $this->assertFileContentEquals(__DIR__.'/Fixtures/autoload_real_functions_with_removed_include_paths_and_autolad_files.php', $this->vendorDir.'/composer/autoload_real.php');
$this->assertFileEquals(__DIR__.'/Fixtures/autoload_static_functions_with_removed_include_paths_and_autolad_files.php', $this->vendorDir.'/composer/autoload_static.php'); $this->assertFileContentEquals(__DIR__.'/Fixtures/autoload_static_functions_with_removed_include_paths_and_autolad_files.php', $this->vendorDir.'/composer/autoload_static.php');
$this->assertFileNotExists($this->vendorDir.'/composer/autoload_files.php'); $this->assertFileNotExists($this->vendorDir.'/composer/autoload_files.php');
$this->assertFileNotExists($this->vendorDir.'/composer/include_paths.php'); $this->assertFileNotExists($this->vendorDir.'/composer/include_paths.php');
} }
@ -930,9 +930,9 @@ EOF;
file_put_contents($this->workingDir . '/root2.php', '<?php function testFilesAutoloadOrderByDependencyRoot() {}'); file_put_contents($this->workingDir . '/root2.php', '<?php function testFilesAutoloadOrderByDependencyRoot() {}');
$this->generator->dump($this->config, $this->repository, $package, $this->im, 'composer', false, 'FilesAutoloadOrder'); $this->generator->dump($this->config, $this->repository, $package, $this->im, 'composer', false, 'FilesAutoloadOrder');
$this->assertFileEquals(__DIR__ . '/Fixtures/autoload_functions_by_dependency.php', $this->vendorDir . '/autoload.php'); $this->assertFileContentEquals(__DIR__ . '/Fixtures/autoload_functions_by_dependency.php', $this->vendorDir . '/autoload.php');
$this->assertFileEquals(__DIR__ . '/Fixtures/autoload_real_files_by_dependency.php', $this->vendorDir . '/composer/autoload_real.php'); $this->assertFileContentEquals(__DIR__ . '/Fixtures/autoload_real_files_by_dependency.php', $this->vendorDir . '/composer/autoload_real.php');
$this->assertFileEquals(__DIR__ . '/Fixtures/autoload_static_files_by_dependency.php', $this->vendorDir . '/composer/autoload_static.php'); $this->assertFileContentEquals(__DIR__ . '/Fixtures/autoload_static_files_by_dependency.php', $this->vendorDir . '/composer/autoload_static.php');
require $this->vendorDir . '/autoload.php'; require $this->vendorDir . '/autoload.php';
@ -1070,7 +1070,7 @@ EOF;
$this->generator->dump($this->config, $this->repository, $package, $this->im, "composer", false, '_10'); $this->generator->dump($this->config, $this->repository, $package, $this->im, "composer", false, '_10');
$this->assertFileEquals(__DIR__.'/Fixtures/include_paths.php', $this->vendorDir.'/composer/include_paths.php'); $this->assertFileContentEquals(__DIR__.'/Fixtures/include_paths.php', $this->vendorDir.'/composer/include_paths.php');
$this->assertEquals( $this->assertEquals(
array( array(
$this->vendorDir."/a/a/lib", $this->vendorDir."/a/a/lib",
@ -1198,8 +1198,8 @@ EOF;
$this->fs->ensureDirectoryExists($this->vendorDir.'/a'); $this->fs->ensureDirectoryExists($this->vendorDir.'/a');
$this->generator->dump($this->config, $this->repository, $package, $this->im, 'composer', false, 'IncludePath'); $this->generator->dump($this->config, $this->repository, $package, $this->im, 'composer', false, 'IncludePath');
$this->assertFileEquals(__DIR__.'/Fixtures/autoload_real_include_path.php', $this->vendorDir.'/composer/autoload_real.php'); $this->assertFileContentEquals(__DIR__.'/Fixtures/autoload_real_include_path.php', $this->vendorDir.'/composer/autoload_real.php');
$this->assertFileEquals(__DIR__.'/Fixtures/autoload_static_include_path.php', $this->vendorDir.'/composer/autoload_static.php'); $this->assertFileContentEquals(__DIR__.'/Fixtures/autoload_static_include_path.php', $this->vendorDir.'/composer/autoload_static.php');
} }
public function testVendorDirExcludedFromWorkingDir() public function testVendorDirExcludedFromWorkingDir()
@ -1577,12 +1577,12 @@ EOF;
{ {
$a = __DIR__.'/Fixtures/autoload_'.$name.'.php'; $a = __DIR__.'/Fixtures/autoload_'.$name.'.php';
$b = $dir.'/autoload_'.$type.'.php'; $b = $dir.'/autoload_'.$type.'.php';
$this->assertFileEquals($a, $b); $this->assertFileContentEquals($a, $b);
} }
public static function assertFileEquals($expected, $actual, $message = '', $canonicalize = false, $ignoreCase = false) public static function assertFileContentEquals($expected, $actual, $message = '', $canonicalize = false, $ignoreCase = false)
{ {
return self::assertEquals( self::assertEqualsNormalized(
file_get_contents($expected), file_get_contents($expected),
file_get_contents($actual), file_get_contents($actual),
$message ?: $expected.' equals '.$actual, $message ?: $expected.' equals '.$actual,
@ -1593,8 +1593,8 @@ EOF;
); );
} }
public static function assertEquals($expected, $actual, $message = '', $delta = 0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false) public static function assertEqualsNormalized($expected, $actual, $message = '', $delta = 0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false)
{ {
return parent::assertEquals(str_replace("\r", '', $expected), str_replace("\r", '', $actual), $message, $delta, $maxDepth, $canonicalize, $ignoreCase); parent::assertEquals(str_replace("\r", '', $expected), str_replace("\r", '', $actual), $message, $delta, $maxDepth, $canonicalize, $ignoreCase);
} }
} }

@ -13,7 +13,7 @@
namespace Composer\Test\Autoload; namespace Composer\Test\Autoload;
use Composer\Autoload\ClassLoader; use Composer\Autoload\ClassLoader;
use PHPUnit\Framework\TestCase; use Composer\Test\TestCase;
/** /**
* Tests the Composer\Autoload\ClassLoader class. * Tests the Composer\Autoload\ClassLoader class.

@ -240,7 +240,7 @@ class ClassMapGeneratorTest extends TestCase
$fs->removeDirectory($tempDir); $fs->removeDirectory($tempDir);
} }
protected function assertEqualsNormalized($expected, $actual, $message = null) protected function assertEqualsNormalized($expected, $actual, $message = '')
{ {
foreach ($expected as $ns => $path) { foreach ($expected as $ns => $path) {
$expected[$ns] = strtr($path, '\\', '/'); $expected[$ns] = strtr($path, '\\', '/');

@ -108,14 +108,8 @@ class CacheTest extends TestCase
public function testClearCache() public function testClearCache()
{ {
$this->filesystem
->method('removeDirectory')
->with($this->root.'/')
->willReturn(true);
$io = $this->getMockBuilder('Composer\IO\IOInterface')->getMock(); $io = $this->getMockBuilder('Composer\IO\IOInterface')->getMock();
$this->cache = new Cache($io, $this->root, 'a-z0-9.', $this->filesystem); $this->cache = new Cache($io, $this->root, 'a-z0-9.', $this->filesystem);
$this->assertTrue($this->cache->clear()); $this->assertTrue($this->cache->clear());
} }
} }

@ -222,6 +222,7 @@ class ConfigTest extends TestCase
/** /**
* @dataProvider allowedUrlProvider * @dataProvider allowedUrlProvider
* @doesNotPerformAssertions
* *
* @param string $url * @param string $url
*/ */

@ -13,7 +13,7 @@
namespace Composer\Test\Console; namespace Composer\Test\Console;
use Composer\Console\HtmlOutputFormatter; use Composer\Console\HtmlOutputFormatter;
use PHPUnit\Framework\TestCase; use Composer\Test\TestCase;
use Symfony\Component\Console\Formatter\OutputFormatterStyle; use Symfony\Component\Console\Formatter\OutputFormatterStyle;
class HtmlOutputFormatterTest extends TestCase class HtmlOutputFormatterTest extends TestCase

@ -18,7 +18,7 @@ use Composer\DependencyResolver\RuleSet;
use Composer\DependencyResolver\RuleSetIterator; use Composer\DependencyResolver\RuleSetIterator;
use Composer\DependencyResolver\Pool; use Composer\DependencyResolver\Pool;
use Composer\Package\BasePackage; use Composer\Package\BasePackage;
use PHPUnit\Framework\TestCase; use Composer\Test\TestCase;
class RuleSetIteratorTest extends TestCase class RuleSetIteratorTest extends TestCase
{ {

@ -12,7 +12,7 @@
namespace Composer\Test\Downloader; namespace Composer\Test\Downloader;
use PHPUnit\Framework\TestCase; use Composer\Test\TestCase;
class ArchiveDownloaderTest extends TestCase class ArchiveDownloaderTest extends TestCase
{ {

@ -13,7 +13,7 @@
namespace Composer\Test\Downloader; namespace Composer\Test\Downloader;
use Composer\Downloader\DownloadManager; use Composer\Downloader\DownloadManager;
use PHPUnit\Framework\TestCase; use Composer\Test\TestCase;
class DownloadManagerTest extends TestCase class DownloadManagerTest extends TestCase
{ {

@ -224,7 +224,7 @@ class FileDownloaderTest extends TestCase
public function testDowngradeShowsAppropriateMessage() public function testDowngradeShowsAppropriateMessage()
{ {
$oldPackage = $this->getMockBuilder('Composer\Package\PackageInterface')->getMock(); $oldPackage = $this->getMockBuilder('Composer\Package\PackageInterface')->getMock();
$oldPackage->expects($this->any()) $oldPackage->expects($this->once())
->method('getFullPrettyVersion') ->method('getFullPrettyVersion')
->will($this->returnValue('1.2.0')); ->will($this->returnValue('1.2.0'));
$oldPackage->expects($this->once()) $oldPackage->expects($this->once())

@ -157,7 +157,7 @@ class FossilDownloaderTest extends TestCase
->method('execute') ->method('execute')
->with($this->equalTo($expectedResetCommand)); ->with($this->equalTo($expectedResetCommand));
$filesystem = $this->getMockBuilder('Composer\Util\Filesystem')->getMock(); $filesystem = $this->getMockBuilder('Composer\Util\Filesystem')->getMock();
$filesystem->expects($this->any()) $filesystem->expects($this->once())
->method('removeDirectory') ->method('removeDirectory')
->with($this->equalTo('composerPath')) ->with($this->equalTo('composerPath'))
->will($this->returnValue(true)); ->will($this->returnValue(true));

@ -712,7 +712,7 @@ composer https://github.com/old/url (push)
->with($this->equalTo($expectedGitResetCommand)) ->with($this->equalTo($expectedGitResetCommand))
->will($this->returnValue(0)); ->will($this->returnValue(0));
$filesystem = $this->getMockBuilder('Composer\Util\Filesystem')->getMock(); $filesystem = $this->getMockBuilder('Composer\Util\Filesystem')->getMock();
$filesystem->expects($this->any()) $filesystem->expects($this->once())
->method('removeDirectory') ->method('removeDirectory')
->with($this->equalTo('composerPath')) ->with($this->equalTo('composerPath'))
->will($this->returnValue(true)); ->will($this->returnValue(true));

@ -146,7 +146,7 @@ class HgDownloaderTest extends TestCase
->method('execute') ->method('execute')
->with($this->equalTo($expectedResetCommand)); ->with($this->equalTo($expectedResetCommand));
$filesystem = $this->getMockBuilder('Composer\Util\Filesystem')->getMock(); $filesystem = $this->getMockBuilder('Composer\Util\Filesystem')->getMock();
$filesystem->expects($this->any()) $filesystem->expects($this->once())
->method('removeDirectory') ->method('removeDirectory')
->with($this->equalTo('composerPath')) ->with($this->equalTo('composerPath'))
->will($this->returnValue(true)); ->will($this->returnValue(true));

@ -104,6 +104,9 @@ class PerforceDownloaderTest extends TestCase
return $repository; return $repository;
} }
/**
* @doesNotPerformAssertions
*/
public function testInitPerforceInstantiatesANewPerforceObject() public function testInitPerforceInstantiatesANewPerforceObject()
{ {
$this->downloader->initPerforce($this->package, $this->testPath, 'SOURCE_REF'); $this->downloader->initPerforce($this->package, $this->testPath, 'SOURCE_REF');

@ -17,7 +17,7 @@ use Composer\Installer\NoopInstaller;
use Composer\DependencyResolver\Operation\InstallOperation; use Composer\DependencyResolver\Operation\InstallOperation;
use Composer\DependencyResolver\Operation\UpdateOperation; use Composer\DependencyResolver\Operation\UpdateOperation;
use Composer\DependencyResolver\Operation\UninstallOperation; use Composer\DependencyResolver\Operation\UninstallOperation;
use PHPUnit\Framework\TestCase; use Composer\Test\TestCase;
class InstallationManagerTest extends TestCase class InstallationManagerTest extends TestCase
{ {

@ -13,7 +13,7 @@
namespace Composer\Test\Installer; namespace Composer\Test\Installer;
use Composer\Installer\InstallerEvent; use Composer\Installer\InstallerEvent;
use PHPUnit\Framework\TestCase; use Composer\Test\TestCase;
class InstallerEventTest extends TestCase class InstallerEventTest extends TestCase
{ {

@ -35,7 +35,7 @@ class LibraryInstallerTest extends TestCase
$this->fs = new Filesystem; $this->fs = new Filesystem;
$this->composer = new Composer(); $this->composer = new Composer();
$this->config = new Config(); $this->config = new Config(false);
$this->composer->setConfig($this->config); $this->composer->setConfig($this->config);
$this->rootDir = $this->getUniqueTmpDirectory(); $this->rootDir = $this->getUniqueTmpDirectory();

@ -13,7 +13,7 @@
namespace Composer\Test\Installer; namespace Composer\Test\Installer;
use Composer\Installer\MetapackageInstaller; use Composer\Installer\MetapackageInstaller;
use PHPUnit\Framework\TestCase; use Composer\Test\TestCase;
class MetapackageInstallerTest extends TestCase class MetapackageInstallerTest extends TestCase
{ {

@ -13,7 +13,7 @@
namespace Composer\Test\Installer; namespace Composer\Test\Installer;
use Composer\Installer\SuggestedPackagesReporter; use Composer\Installer\SuggestedPackagesReporter;
use PHPUnit\Framework\TestCase; use Composer\Test\TestCase;
/** /**
* @coversDefaultClass Composer\Installer\SuggestedPackagesReporter * @coversDefaultClass Composer\Installer\SuggestedPackagesReporter

@ -13,7 +13,7 @@
namespace Composer\Test\Json; namespace Composer\Test\Json;
use JsonSchema\Validator; use JsonSchema\Validator;
use PHPUnit\Framework\TestCase; use Composer\Test\TestCase;
/** /**
* @author Rob Bast <rob.bast@gmail.com> * @author Rob Bast <rob.bast@gmail.com>

@ -14,7 +14,7 @@ namespace Composer\Test\Json;
use Seld\JsonLint\ParsingException; use Seld\JsonLint\ParsingException;
use Composer\Json\JsonFile; use Composer\Json\JsonFile;
use PHPUnit\Framework\TestCase; use Composer\Test\TestCase;
class JsonFileTest extends TestCase class JsonFileTest extends TestCase
{ {

@ -13,7 +13,7 @@
namespace Composer\Test\Json; namespace Composer\Test\Json;
use Composer\Json\JsonFormatter; use Composer\Json\JsonFormatter;
use PHPUnit\Framework\TestCase; use Composer\Test\TestCase;
class JsonFormatterTest extends TestCase class JsonFormatterTest extends TestCase
{ {

@ -13,7 +13,7 @@
namespace Composer\Test\Json; namespace Composer\Test\Json;
use Composer\Json\JsonManipulator; use Composer\Json\JsonManipulator;
use PHPUnit\Framework\TestCase; use Composer\Test\TestCase;
class JsonManipulatorTest extends TestCase class JsonManipulatorTest extends TestCase
{ {

@ -13,7 +13,7 @@
namespace Composer\Test\Json; namespace Composer\Test\Json;
use Composer\Json\JsonValidationException; use Composer\Json\JsonValidationException;
use PHPUnit\Framework\TestCase; use Composer\Test\TestCase;
class JsonValidationExceptionTest extends TestCase class JsonValidationExceptionTest extends TestCase
{ {

@ -13,7 +13,7 @@
namespace Composer\Test\Package\Archiver; namespace Composer\Test\Package\Archiver;
use Composer\Package\Archiver\GitExcludeFilter; use Composer\Package\Archiver\GitExcludeFilter;
use PHPUnit\Framework\TestCase; use Composer\Test\TestCase;
class GitExcludeFilterTest extends TestCase class GitExcludeFilterTest extends TestCase
{ {

@ -13,7 +13,7 @@
namespace Composer\Test\Package\Archiver; namespace Composer\Test\Package\Archiver;
use Composer\Package\Archiver\HgExcludeFilter; use Composer\Package\Archiver\HgExcludeFilter;
use PHPUnit\Framework\TestCase; use Composer\Test\TestCase;
class HgExcludeFilterTest extends TestCase class HgExcludeFilterTest extends TestCase
{ {

@ -13,10 +13,13 @@
namespace Composer\Test\Package; namespace Composer\Test\Package;
use Composer\Package\BasePackage; use Composer\Package\BasePackage;
use PHPUnit\Framework\TestCase; use Composer\Test\TestCase;
class BasePackageTest extends TestCase class BasePackageTest extends TestCase
{ {
/**
* @doesNotPerformAssertions
*/
public function testSetSameRepository() public function testSetSameRepository()
{ {
$package = $this->getMockForAbstractClass('Composer\Package\BasePackage', array('foo')); $package = $this->getMockForAbstractClass('Composer\Package\BasePackage', array('foo'));

@ -15,7 +15,7 @@ namespace Composer\Test\Package\Dumper;
use Composer\Package\Dumper\ArrayDumper; use Composer\Package\Dumper\ArrayDumper;
use Composer\Package\Link; use Composer\Package\Link;
use Composer\Semver\Constraint\Constraint; use Composer\Semver\Constraint\Constraint;
use PHPUnit\Framework\TestCase; use Composer\Test\TestCase;
class ArrayDumperTest extends TestCase class ArrayDumperTest extends TestCase
{ {

@ -14,7 +14,7 @@ namespace Composer\Test\Package\Loader;
use Composer\Package\Loader\ArrayLoader; use Composer\Package\Loader\ArrayLoader;
use Composer\Package\Dumper\ArrayDumper; use Composer\Package\Dumper\ArrayDumper;
use PHPUnit\Framework\TestCase; use Composer\Test\TestCase;
class ArrayLoaderTest extends TestCase class ArrayLoaderTest extends TestCase
{ {
@ -83,7 +83,7 @@ class ArrayLoaderTest extends TestCase
$this->assertEquals('1.2.3.4', $package->getVersion()); $this->assertEquals('1.2.3.4', $package->getVersion());
} }
public function testParseDumpProvider() public function parseDumpProvider()
{ {
$validConfig = array( $validConfig = array(
'name' => 'A/B', 'name' => 'A/B',
@ -142,7 +142,7 @@ class ArrayLoaderTest extends TestCase
* The default parser should default to loading the config as this * The default parser should default to loading the config as this
* allows require-dev libraries to have transport options included. * allows require-dev libraries to have transport options included.
* *
* @dataProvider testParseDumpProvider * @dataProvider parseDumpProvider
*/ */
public function testParseDumpDefaultLoadConfig($config) public function testParseDumpDefaultLoadConfig($config)
{ {
@ -153,7 +153,7 @@ class ArrayLoaderTest extends TestCase
} }
/** /**
* @dataProvider testParseDumpProvider * @dataProvider parseDumpProvider
*/ */
public function testParseDumpTrueLoadConfig($config) public function testParseDumpTrueLoadConfig($config)
{ {
@ -165,7 +165,7 @@ class ArrayLoaderTest extends TestCase
} }
/** /**
* @dataProvider testParseDumpProvider * @dataProvider parseDumpProvider
*/ */
public function testParseDumpFalseLoadConfig($config) public function testParseDumpFalseLoadConfig($config)
{ {

@ -17,7 +17,7 @@ use Composer\Package\Loader\RootPackageLoader;
use Composer\Package\BasePackage; use Composer\Package\BasePackage;
use Composer\Package\Version\VersionGuesser; use Composer\Package\Version\VersionGuesser;
use Composer\Semver\VersionParser; use Composer\Semver\VersionParser;
use PHPUnit\Framework\TestCase; use Composer\Test\TestCase;
use Prophecy\Argument; use Prophecy\Argument;
class RootPackageLoaderTest extends TestCase class RootPackageLoaderTest extends TestCase

@ -14,7 +14,7 @@ namespace Composer\Test\Package\Loader;
use Composer\Package\Loader\ValidatingArrayLoader; use Composer\Package\Loader\ValidatingArrayLoader;
use Composer\Package\Loader\InvalidPackageException; use Composer\Package\Loader\InvalidPackageException;
use PHPUnit\Framework\TestCase; use Composer\Test\TestCase;
class ValidatingArrayLoaderTest extends TestCase class ValidatingArrayLoaderTest extends TestCase
{ {

@ -14,7 +14,7 @@ namespace Composer\Test\Package;
use Composer\Package\Locker; use Composer\Package\Locker;
use Composer\IO\NullIO; use Composer\IO\NullIO;
use PHPUnit\Framework\TestCase; use Composer\Test\TestCase;
class LockerTest extends TestCase class LockerTest extends TestCase
{ {

@ -15,7 +15,7 @@ namespace Composer\Test\Package\Version;
use Composer\Config; use Composer\Config;
use Composer\Package\Version\VersionGuesser; use Composer\Package\Version\VersionGuesser;
use Composer\Semver\VersionParser; use Composer\Semver\VersionParser;
use PHPUnit\Framework\TestCase; use Composer\Test\TestCase;
class VersionGuesserTest extends TestCase class VersionGuesserTest extends TestCase
{ {

@ -13,7 +13,7 @@
namespace Composer\Test\Package\Version; namespace Composer\Test\Package\Version;
use Composer\Package\Version\VersionParser; use Composer\Package\Version\VersionParser;
use PHPUnit\Framework\TestCase; use Composer\Test\TestCase;
class VersionParserTest extends TestCase class VersionParserTest extends TestCase
{ {

@ -16,7 +16,7 @@ use Composer\Package\Version\VersionSelector;
use Composer\Package\Package; use Composer\Package\Package;
use Composer\Package\Link; use Composer\Package\Link;
use Composer\Semver\VersionParser; use Composer\Semver\VersionParser;
use PHPUnit\Framework\TestCase; use Composer\Test\TestCase;
class VersionSelectorTest extends TestCase class VersionSelectorTest extends TestCase
{ {

@ -105,7 +105,7 @@ class PluginInstallerTest extends TestCase
$this->autoloadGenerator = new AutoloadGenerator($dispatcher); $this->autoloadGenerator = new AutoloadGenerator($dispatcher);
$this->composer = new Composer(); $this->composer = new Composer();
$config = new Config(); $config = new Config(false);
$this->composer->setConfig($config); $this->composer->setConfig($config);
$this->composer->setDownloadManager($dm); $this->composer->setDownloadManager($dm);
$this->composer->setRepositoryManager($rm); $this->composer->setRepositoryManager($rm);

@ -13,7 +13,7 @@
namespace Composer\Test\Question; namespace Composer\Test\Question;
use Composer\Question\StrictConfirmationQuestion; use Composer\Question\StrictConfirmationQuestion;
use PHPUnit\Framework\TestCase; use Composer\Test\TestCase;
use Symfony\Component\Console\Exception\InvalidArgumentException; use Symfony\Component\Console\Exception\InvalidArgumentException;
use Symfony\Component\Console\Helper\QuestionHelper; use Symfony\Component\Console\Helper\QuestionHelper;
use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Input\ArrayInput;

@ -66,8 +66,10 @@ class ChannelReaderTest extends TestCase
$reader = new \Composer\Repository\Pear\ChannelReader($httpDownloader); $reader = new \Composer\Repository\Pear\ChannelReader($httpDownloader);
$reader->read('http://pear.1.0.net/'); $pear10 = $reader->read('http://pear.1.0.net/');
$reader->read('http://pear.1.1.net/'); $this->assertCount(2, $pear10->getPackages());
$pear11 = $reader->read('http://pear.1.1.net/');
$this->assertCount(3, $pear11->getPackages());
} }
public function testShouldCreatePackages() public function testShouldCreatePackages()

@ -86,7 +86,7 @@ class RepositoryManagerTest extends TestCase
$rm->setRepositoryClass('artifact', 'Composer\Repository\ArtifactRepository'); $rm->setRepositoryClass('artifact', 'Composer\Repository\ArtifactRepository');
$rm->createRepository('composer', array('url' => 'http://example.org')); $rm->createRepository('composer', array('url' => 'http://example.org'));
$rm->createRepository($type, $options); $this->assertInstanceOf('Composer\Repository\RepositoryInterface', $rm->createRepository($type, $options));
} }
public function creationCases() public function creationCases()

@ -105,4 +105,24 @@ abstract class TestCase extends BaseTestCase
$this->markTestSkipped($executableName . ' is not found or not executable.'); $this->markTestSkipped($executableName . ' is not found or not executable.');
} }
} }
/**
* @param string $exception
* @param string|null $message
* @param int|null $code
*/
public function setExpectedException($exception, $message = null, $code = null)
{
if (!class_exists('PHPUnit\Framework\Error\Notice')) {
$exception = str_replace('PHPUnit\\Framework\\Error\\', 'PHPUnit_Framework_Error_', $exception);
}
if (method_exists($this, 'expectException')) {
$this->expectException($exception);
if (null !== $message) {
$this->expectExceptionMessage($message);
}
} else {
parent::setExpectedException($exception, $message, $code);
}
}
} }

@ -14,7 +14,7 @@ namespace Composer\Test\Util;
use Composer\Util\Bitbucket; use Composer\Util\Bitbucket;
use Composer\Util\Http\Response; use Composer\Util\Http\Response;
use PHPUnit\Framework\TestCase; use Composer\Test\TestCase;
/** /**
* @author Paul Wenke <wenke.paul@gmail.com> * @author Paul Wenke <wenke.paul@gmail.com>

@ -20,6 +20,16 @@ use Composer\Test\TestCase;
*/ */
class ErrorHandlerTest extends TestCase class ErrorHandlerTest extends TestCase
{ {
public function setUp()
{
ErrorHandler::register();
}
public function tearDown()
{
restore_error_handler();
}
/** /**
* Test ErrorHandler handles notices * Test ErrorHandler handles notices
*/ */
@ -27,8 +37,6 @@ class ErrorHandlerTest extends TestCase
{ {
$this->setExpectedException('\ErrorException', 'Undefined index: baz'); $this->setExpectedException('\ErrorException', 'Undefined index: baz');
ErrorHandler::register();
$array = array('foo' => 'bar'); $array = array('foo' => 'bar');
$array['baz']; $array['baz'];
} }
@ -40,18 +48,15 @@ class ErrorHandlerTest extends TestCase
{ {
$this->setExpectedException('\ErrorException', 'array_merge'); $this->setExpectedException('\ErrorException', 'array_merge');
ErrorHandler::register();
array_merge(array(), 'string'); array_merge(array(), 'string');
} }
/** /**
* Test ErrorHandler handles warnings * Test ErrorHandler handles warnings
* @doesNotPerformAssertions
*/ */
public function testErrorHandlerRespectsAtOperator() public function testErrorHandlerRespectsAtOperator()
{ {
ErrorHandler::register();
@trigger_error('test', E_USER_NOTICE); @trigger_error('test', E_USER_NOTICE);
} }
} }

@ -15,7 +15,7 @@ namespace Composer\Test\Util;
use Composer\Downloader\TransportException; use Composer\Downloader\TransportException;
use Composer\Util\GitHub; use Composer\Util\GitHub;
use Composer\Util\Http\Response; use Composer\Util\Http\Response;
use PHPUnit\Framework\TestCase; use Composer\Test\TestCase;
use RecursiveArrayIterator; use RecursiveArrayIterator;
use RecursiveIteratorIterator; use RecursiveIteratorIterator;

@ -15,7 +15,7 @@ namespace Composer\Test\Util;
use Composer\Downloader\TransportException; use Composer\Downloader\TransportException;
use Composer\Util\GitLab; use Composer\Util\GitLab;
use Composer\Util\Http\Response; use Composer\Util\Http\Response;
use PHPUnit\Framework\TestCase; use Composer\Test\TestCase;
/** /**
* @author Jérôme Tamarelle <jerome@tamarelle.net> * @author Jérôme Tamarelle <jerome@tamarelle.net>

@ -7,7 +7,7 @@ use Composer\IO\IOInterface;
use Composer\Util\Filesystem; use Composer\Util\Filesystem;
use Composer\Util\Git; use Composer\Util\Git;
use Composer\Util\ProcessExecutor; use Composer\Util\ProcessExecutor;
use PHPUnit\Framework\TestCase; use Composer\Test\TestCase;
class GitTest extends TestCase class GitTest extends TestCase
{ {
@ -102,6 +102,7 @@ class GitTest extends TestCase
$this->mockConfig($protocol); $this->mockConfig($protocol);
$this->process $this->process
->expects($this->atLeast(2))
->method('execute') ->method('execute')
->willReturnMap(array( ->willReturnMap(array(
array('git command failing', null, null, 1), array('git command failing', null, null, 1),
@ -113,11 +114,13 @@ class GitTest extends TestCase
->willReturn(false); ->willReturn(false);
$this->io $this->io
->expects($this->atLeastOnce())
->method('hasAuthentication') ->method('hasAuthentication')
->with($this->equalTo('github.com')) ->with($this->equalTo('github.com'))
->willReturn(true); ->willReturn(true);
$this->io $this->io
->expects($this->atLeastOnce())
->method('getAuthentication') ->method('getAuthentication')
->with($this->equalTo('github.com')) ->with($this->equalTo('github.com'))
->willReturn(array('username' => 'token', 'password' => $gitHubToken)); ->willReturn(array('username' => 'token', 'password' => $gitHubToken));

@ -14,7 +14,7 @@ namespace Composer\Test\Util;
use Composer\Util\IniHelper; use Composer\Util\IniHelper;
use Composer\XdebugHandler\XdebugHandler; use Composer\XdebugHandler\XdebugHandler;
use PHPUnit\Framework\TestCase; use Composer\Test\TestCase;
/** /**
* @author John Stevenson <john-stevenson@blueyonder.co.uk> * @author John Stevenson <john-stevenson@blueyonder.co.uk>

@ -13,7 +13,7 @@
namespace Composer\Test\Util; namespace Composer\Test\Util;
use Composer\Util\NoProxyPattern; use Composer\Util\NoProxyPattern;
use PHPUnit\Framework\TestCase; use Composer\Test\TestCase;
class NoProxyPatternTest extends TestCase class NoProxyPatternTest extends TestCase
{ {

@ -13,7 +13,7 @@
namespace Composer\Test\Util; namespace Composer\Test\Util;
use Composer\Util\Perforce; use Composer\Util\Perforce;
use PHPUnit\Framework\TestCase; use Composer\Test\TestCase;
use Composer\Util\ProcessExecutor; use Composer\Util\ProcessExecutor;
/** /**

@ -13,7 +13,7 @@
namespace Composer\Test\Util; namespace Composer\Test\Util;
use Composer\Util\Platform; use Composer\Util\Platform;
use PHPUnit\Framework\TestCase; use Composer\Test\TestCase;
/** /**
* PlatformTest * PlatformTest

@ -110,7 +110,7 @@ class ProcessExecutorTest extends TestCase
$output = new BufferedOutput(OutputInterface::VERBOSITY_NORMAL, true); $output = new BufferedOutput(OutputInterface::VERBOSITY_NORMAL, true);
$process = new ProcessExecutor(new ConsoleIO(new ArrayInput(array()), $output, new HelperSet(array()))); $process = new ProcessExecutor(new ConsoleIO(new ArrayInput(array()), $output, new HelperSet(array())));
$process->execute('echo \'<error>foo</error>\''); $process->execute('php -r "echo \'<error>foo</error>\'.PHP_EOL;"');
$this->assertSame('<error>foo</error>'.PHP_EOL, $output->fetch()); $this->assertSame('<error>foo</error>'.PHP_EOL, $output->fetch());
} }
} }

@ -13,7 +13,7 @@
namespace Composer\Test\Util; namespace Composer\Test\Util;
use Composer\Util\RemoteFilesystem; use Composer\Util\RemoteFilesystem;
use PHPUnit\Framework\TestCase; use Composer\Test\TestCase;
class RemoteFilesystemTest extends TestCase class RemoteFilesystemTest extends TestCase
{ {
@ -78,6 +78,12 @@ class RemoteFilesystemTest extends TestCase
->will($this->returnValue(true)) ->will($this->returnValue(true))
; ;
$io
->expects($this->once())
->method('getAuthentication')
->will($this->returnValue(array('username' => null, 'password' => null)))
;
$streamOptions = array('ssl' => array( $streamOptions = array('ssl' => array(
'allow_self_signed' => true, 'allow_self_signed' => true,
)); ));
@ -95,6 +101,12 @@ class RemoteFilesystemTest extends TestCase
->will($this->returnValue(true)) ->will($this->returnValue(true))
; ;
$io
->expects($this->once())
->method('getAuthentication')
->will($this->returnValue(array('username' => null, 'password' => null)))
;
$streamOptions = array('http' => array( $streamOptions = array('http' => array(
'header' => 'Foo: bar', 'header' => 'Foo: bar',
)); ));

@ -13,7 +13,7 @@
namespace Composer\Test\Util; namespace Composer\Test\Util;
use Composer\Util\Silencer; use Composer\Util\Silencer;
use PHPUnit\Framework\TestCase; use Composer\Test\TestCase;
/** /**
* SilencerTest * SilencerTest

@ -13,7 +13,7 @@
namespace Composer\Test\Util; namespace Composer\Test\Util;
use Composer\Util\StreamContextFactory; use Composer\Util\StreamContextFactory;
use PHPUnit\Framework\TestCase; use Composer\Test\TestCase;
class StreamContextFactoryTest extends TestCase class StreamContextFactoryTest extends TestCase
{ {

@ -16,7 +16,7 @@ use Composer\Config;
use Composer\IO\NullIO; use Composer\IO\NullIO;
use Composer\Util\Platform; use Composer\Util\Platform;
use Composer\Util\Svn; use Composer\Util\Svn;
use PHPUnit\Framework\TestCase; use Composer\Test\TestCase;
class SvnTest extends TestCase class SvnTest extends TestCase
{ {

@ -13,7 +13,7 @@
namespace Composer\Test\Util; namespace Composer\Test\Util;
use Composer\Util\TlsHelper; use Composer\Util\TlsHelper;
use PHPUnit\Framework\TestCase; use Composer\Test\TestCase;
class TlsHelperTest extends TestCase class TlsHelperTest extends TestCase
{ {

@ -13,7 +13,7 @@
namespace Composer\Test\Util; namespace Composer\Test\Util;
use Composer\Util\Url; use Composer\Util\Url;
use PHPUnit\Framework\TestCase; use Composer\Test\TestCase;
use Composer\Config; use Composer\Config;
class UrlTest extends TestCase class UrlTest extends TestCase

@ -13,7 +13,7 @@
namespace Composer\Test\Util; namespace Composer\Test\Util;
use Composer\Util\Zip; use Composer\Util\Zip;
use PHPUnit\Framework\TestCase; use Composer\Test\TestCase;
/** /**
* @author Andreas Schempp <andreas.schempp@terminal42.ch> * @author Andreas Schempp <andreas.schempp@terminal42.ch>

Loading…
Cancel
Save