mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
Remove use of deprecated getMock method
This commit is contained in:
parent
036fc44c25
commit
066351c5b9
42 changed files with 279 additions and 272 deletions
|
@ -57,10 +57,12 @@ class InstallerTest extends TestCase
|
|||
*/
|
||||
public function testInstaller(RootPackageInterface $rootPackage, $repositories, array $options)
|
||||
{
|
||||
$io = $this->getMock('Composer\IO\IOInterface');
|
||||
$io = $this->getMockBuilder('Composer\IO\IOInterface')->getMock();
|
||||
|
||||
$downloadManager = $this->getMock('Composer\Downloader\DownloadManager', array(), array($io));
|
||||
$config = $this->getMock('Composer\Config');
|
||||
$downloadManager = $this->getMockBuilder('Composer\Downloader\DownloadManager')
|
||||
->setConstructorArgs(array($io))
|
||||
->getMock();
|
||||
$config = $this->getMockBuilder('Composer\Config')->getMock();
|
||||
|
||||
$repositoryManager = new RepositoryManager($io, $config);
|
||||
$repositoryManager->setLocalRepository(new InstalledArrayRepository());
|
||||
|
@ -202,7 +204,9 @@ class InstallerTest extends TestCase
|
|||
$composer->setLocker($locker);
|
||||
|
||||
$eventDispatcher = $this->getMockBuilder('Composer\EventDispatcher\EventDispatcher')->disableOriginalConstructor()->getMock();
|
||||
$autoloadGenerator = $this->getMock('Composer\Autoload\AutoloadGenerator', array(), array($eventDispatcher));
|
||||
$autoloadGenerator = $this->getMockBuilder('Composer\Autoload\AutoloadGenerator')
|
||||
->setConstructorArgs(array($eventDispatcher))
|
||||
->getMock();
|
||||
$composer->setAutoloadGenerator($autoloadGenerator);
|
||||
$composer->setEventDispatcher($eventDispatcher);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue