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:
parent
ebd0a60411
commit
9f3e2105da
15 changed files with 394 additions and 265 deletions
|
@ -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, [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue