diff --git a/Tests/Asset/AbstractAssetManagerTest.php b/Tests/Asset/AbstractAssetManagerTest.php index b0532fe..a5648f5 100644 --- a/Tests/Asset/AbstractAssetManagerTest.php +++ b/Tests/Asset/AbstractAssetManagerTest.php @@ -233,6 +233,9 @@ public function testAddDependenciesForInstallCommand() ); /* @var RootPackageInterface|\PHPUnit_Framework_MockObject_MockObject $rootPackage */ $rootPackage = $this->getMockBuilder('Composer\Package\RootPackageInterface')->getMock(); + $rootPackage->expects($this->any()) + ->method('getLicense') + ->willReturn(array()); $this->assertFalse($this->manager->isInstalled()); $this->assertFalse($this->manager->isUpdatable()); @@ -264,6 +267,9 @@ public function testAddDependenciesForUpdateCommand() $jsonFile = new JsonFile($this->cwd.'/package.json'); /* @var RootPackageInterface|\PHPUnit_Framework_MockObject_MockObject $rootPackage */ $rootPackage = $this->getMockBuilder('Composer\Package\RootPackageInterface')->getMock(); + $rootPackage->expects($this->any()) + ->method('getLicense') + ->willReturn(array()); $nodeModulePath = $this->cwd.ltrim(AbstractAssetManager::NODE_MODULES_PATH, '.'); $jsonFile->write($package); diff --git a/Tests/Asset/AssetPackageTest.php b/Tests/Asset/AssetPackageTest.php index 47469f1..ed5c4da 100644 --- a/Tests/Asset/AssetPackageTest.php +++ b/Tests/Asset/AssetPackageTest.php @@ -54,6 +54,10 @@ protected function setUp() ->setMethods(array('exists', 'getPath', 'read', 'write')) ->getMock(); + $this->rootPackage->expects($this->any()) + ->method('getLicense') + ->willReturn(array()); + $this->sfs->mkdir($this->cwd); } @@ -148,6 +152,7 @@ public function testInjectionOfRequiredKeys(array $expected, array $package, $li { $this->addPackageFile($package); + $this->rootPackage = $this->getMockBuilder('Composer\Package\RootPackageInterface')->getMock(); $this->rootPackage->expects($this->any()) ->method('getLicense') ->willReturn(array($license));