addPackageUsage() public method

Add a row in the "packages.json" file, with the project name for the "package/version" key
public addPackageUsage ( Composer\Package\PackageInterface $package )
$package Composer\Package\PackageInterface
 /**
  * @test
  *
  * @expectedException \RuntimeException
  * @expectedExceptionMessage Unknown installation source for package "letudiant/foo-bar" ("dev-develop")
  */
 public function packageWithoutInstallationSource()
 {
     $dataManager = new SharedPackageDataManager($this->composer);
     $dataManager->setVendorDir($this->vendorDir);
     $this->rootPackage->expects($this->once())->method('getName')->willReturn('letudiant/root-package');
     $package = $this->getMock('Composer\\Package\\PackageInterface');
     $package->expects($this->exactly(3))->method('getPrettyName')->willReturn('letudiant/foo-bar');
     $package->expects($this->exactly(3))->method('getPrettyVersion')->willReturn('dev-develop');
     $package->expects($this->once())->method('getInstallationSource')->willReturn(null);
     $dataManager->addPackageUsage($package);
 }