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

Fix all remaining php8.1 test suite deprecations

This commit is contained in:
Jordi Boggiano 2021-08-19 13:00:30 +02:00
parent b77fce8a4f
commit a586a753df
No known key found for this signature in database
GPG key ID: 7BBD42C429EC80BC
15 changed files with 184 additions and 268 deletions

View file

@ -15,6 +15,7 @@ namespace Composer\Test\Util;
use Composer\Util\Bitbucket;
use Composer\Util\Http\Response;
use Composer\Test\TestCase;
use Composer\Test\Mock\ProcessExecutorMock;
/**
* @author Paul Wenke <wenke.paul@gmail.com>
@ -456,10 +457,8 @@ class BitbucketTest extends TestCase
public function testAuthorizeOAuthWithoutAvailableGitConfigToken()
{
$process = $this->getMockBuilder('Composer\Util\ProcessExecutor')->getMock();
$process->expects($this->once())
->method('execute')
->willReturn(-1);
$process = new ProcessExecutorMock;
$process->expects(array(), false, array('return' => -1));
$bitbucket = new Bitbucket($this->io, $this->config, $process, $this->httpDownloader, $this->time);
@ -468,10 +467,7 @@ class BitbucketTest extends TestCase
public function testAuthorizeOAuthWithAvailableGitConfigToken()
{
$process = $this->getMockBuilder('Composer\Util\ProcessExecutor')->getMock();
$process->expects($this->once())
->method('execute')
->willReturn(0);
$process = new ProcessExecutorMock;
$bitbucket = new Bitbucket($this->io, $this->config, $process, $this->httpDownloader, $this->time);