1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-10 17:12:51 +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

@ -25,7 +25,7 @@ class SuggestedPackagesReporterTest extends TestCase
protected function setUp()
{
$this->io = $this->getMock('Composer\IO\IOInterface');
$this->io = $this->getMockBuilder('Composer\IO\IOInterface')->getMock();
$this->suggestedPackagesReporter = new SuggestedPackagesReporter($this->io);
}
@ -185,9 +185,9 @@ class SuggestedPackagesReporterTest extends TestCase
*/
public function testOutputSkipInstalledPackages()
{
$repository = $this->getMock('Composer\Repository\RepositoryInterface');
$package1 = $this->getMock('Composer\Package\PackageInterface');
$package2 = $this->getMock('Composer\Package\PackageInterface');
$repository = $this->getMockBuilder('Composer\Repository\RepositoryInterface')->getMock();
$package1 = $this->getMockBuilder('Composer\Package\PackageInterface')->getMock();
$package2 = $this->getMockBuilder('Composer\Package\PackageInterface')->getMock();
$package1->expects($this->once())
->method('getNames')
@ -219,7 +219,7 @@ class SuggestedPackagesReporterTest extends TestCase
*/
public function testOutputNotGettingInstalledPackagesWhenNoSuggestions()
{
$repository = $this->getMock('Composer\Repository\RepositoryInterface');
$repository = $this->getMockBuilder('Composer\Repository\RepositoryInterface')->getMock();
$repository->expects($this->exactly(0))
->method('getPackages');