1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-10 09:02:59 +00:00

Remove use of deprecated getMock method

This commit is contained in:
Jordi Boggiano 2018-04-12 10:24:56 +02:00
parent 036fc44c25
commit 066351c5b9
42 changed files with 279 additions and 272 deletions

View file

@ -33,7 +33,7 @@ class PerforceTest extends TestCase
protected function setUp()
{
$this->processExecutor = $this->getMock('Composer\Util\ProcessExecutor');
$this->processExecutor = $this->getMockBuilder('Composer\Util\ProcessExecutor')->getMock();
$this->repoConfig = $this->getTestRepoConfig();
$this->io = $this->getMockIOInterface();
$this->createNewPerforceWithWindowsFlag(true);
@ -59,7 +59,7 @@ class PerforceTest extends TestCase
public function getMockIOInterface()
{
return $this->getMock('Composer\IO\IOInterface');
return $this->getMockBuilder('Composer\IO\IOInterface')->getMock();
}
protected function createNewPerforceWithWindowsFlag($flag)
@ -618,7 +618,7 @@ class PerforceTest extends TestCase
public function testCheckServerExists()
{
$processExecutor = $this->getMock('Composer\Util\ProcessExecutor');
$processExecutor = $this->getMockBuilder('Composer\Util\ProcessExecutor')->getMock();
$expectedCommand = 'p4 -p perforce.does.exist:port info -s';
$processExecutor->expects($this->at(0))
@ -639,7 +639,7 @@ class PerforceTest extends TestCase
*/
public function testCheckServerClientError()
{
$processExecutor = $this->getMock('Composer\Util\ProcessExecutor');
$processExecutor = $this->getMockBuilder('Composer\Util\ProcessExecutor')->getMock();
$expectedCommand = 'p4 -p perforce.does.exist:port info -s';
$processExecutor->expects($this->at(0))
@ -707,7 +707,7 @@ class PerforceTest extends TestCase
public function testCleanupClientSpecShouldDeleteClient()
{
$fs = $this->getMock('Composer\Util\Filesystem');
$fs = $this->getMockBuilder('Composer\Util\Filesystem')->getMock();
$this->perforce->setFilesystem($fs);
$testClient = $this->perforce->getClient();