本文整理汇总了PHP中Composer\Installer\LibraryInstaller::ensureBinariesPresence方法的典型用法代码示例。如果您正苦于以下问题:PHP LibraryInstaller::ensureBinariesPresence方法的具体用法?PHP LibraryInstaller::ensureBinariesPresence怎么用?PHP LibraryInstaller::ensureBinariesPresence使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Composer\Installer\LibraryInstaller
的用法示例。
在下文中一共展示了LibraryInstaller::ensureBinariesPresence方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testEnsureBinariesInstalled
/**
* @depends testInstallerCreationShouldNotCreateVendorDirectory
* @depends testInstallerCreationShouldNotCreateBinDirectory
*/
public function testEnsureBinariesInstalled()
{
$binaryInstallerMock = $this->getMockBuilder('Composer\\Installer\\BinaryInstaller')->disableOriginalConstructor()->getMock();
$library = new LibraryInstaller($this->io, $this->composer, 'library', null, $binaryInstallerMock);
$package = $this->createPackageMock();
$binaryInstallerMock->expects($this->never())->method('removeBinaries')->with($package);
$binaryInstallerMock->expects($this->once())->method('installBinaries')->with($package, $library->getInstallPath($package), false);
$library->ensureBinariesPresence($package);
}