You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
7004e0d031
The `LibraryInstallerTest::testUninstall()` method mocks a `Package` object, but did not set an expectation for a call to `getName()`, while that method _is_ called in the `LibraryInstaller::uninstall()` method. Without expectation, the mock returns `null`, which was subsequently being passed on to `strpos()` leading to the below error. Fixes: ``` Deprecation triggered by Composer\Test\Installer\LibraryInstallerTest::testUninstall: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated Stack trace: 0 [internal function]: Symfony\Bridge\PhpUnit\DeprecationErrorHandler->handleError(8192, '...', '...', 202) 1 src/Composer/Installer/LibraryInstaller.php(202): strpos(NULL, '...') 2 vendor/react/promise/src/FulfilledPromise.php(28): Composer\Installer\LibraryInstaller->Composer\Installer\{closure}(NULL) 3 src/Composer/Installer/LibraryInstaller.php(208): React\Promise\FulfilledPromise->then(Object(Closure)) 4 tests/Composer/Test/Installer/LibraryInstallerTest.php(221): Composer\Installer\LibraryInstaller->uninstall(Object(Mock_InstalledRepositoryInterface_e3699f95), Object(Mock_Package_e4571076)) ... ``` |
3 years ago | |
---|---|---|
.. | ||
InstallationManagerTest.php | 4 years ago | |
InstallerEventTest.php | 4 years ago | |
LibraryInstallerTest.php | 3 years ago | |
MetapackageInstallerTest.php | 4 years ago | |
SuggestedPackagesReporterTest.php | 4 years ago |