本文整理匯總了PHP中Composer\Repository\RepositoryInterface::method方法的典型用法代碼示例。如果您正苦於以下問題:PHP RepositoryInterface::method方法的具體用法?PHP RepositoryInterface::method怎麽用?PHP RepositoryInterface::method使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Composer\Repository\RepositoryInterface
的用法示例。
在下文中一共展示了RepositoryInterface::method方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: setUp
public function setUp()
{
$this->composerMock = $this->getMockBuilder(Composer::class)->disableOriginalConstructor()->getMock();
$this->lockerMock = $this->getMockBuilder(Locker::class)->disableOriginalConstructor()->getMock();
$this->lockerRepositoryMock = $this->getMockForAbstractClass(\Composer\Repository\RepositoryInterface::class);
$this->packageMock = $this->getMockForAbstractClass(\Composer\Package\CompletePackageInterface::class);
$this->lockerMock->method('getLockedRepository')->willReturn($this->lockerRepositoryMock);
$this->packageMock->method('getType')->willReturn('metapackage');
$this->packageMock->method('getPrettyName')->willReturn('magento/product-test-package-name');
$this->packageMock->method('getName')->willReturn('magento/product-test-package-name');
$this->packageMock->method('getPrettyVersion')->willReturn('123.456.789');
$this->lockerRepositoryMock->method('getPackages')->willReturn([$this->packageMock]);
$objectManager = new ObjectManager($this);
$this->composerInformation = $objectManager->getObject(\Magento\Framework\Composer\ComposerInformation::class, ['composer' => $this->composerMock, 'locker' => $this->lockerMock]);
}