1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-09 00:22:53 +00:00

Add IOMock and get rid of all withConsecutive calls in tests (#11497)

This commit is contained in:
Jordi Boggiano 2023-06-07 14:35:16 +02:00 committed by GitHub
parent ebd0a60411
commit 9f3e2105da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 394 additions and 265 deletions

View file

@ -307,12 +307,9 @@ class ConfigTest extends TestCase
public function testProhibitedUrlsWarningVerifyPeer(): void
{
$io = $this->getMockBuilder(IOInterface::class)->disableOriginalConstructor()->getMock();
$io = $this->getIOMock();
$io
->expects($this->once())
->method('writeError')
->with($this->equalTo('<warning>Warning: Accessing example.org with verify_peer and verify_peer_name disabled.</warning>'));
$io->expects([['text' => '<warning>Warning: Accessing example.org with verify_peer and verify_peer_name disabled.</warning>']], true);
$config = new Config(false);
$config->prohibitUrlByConfig('https://example.org', $io, [