public function testLockBadPackages() { $json = $this->createJsonFileMock(); $repo = $this->createRepositoryManagerMock(); $locker = new Locker($json, $repo, 'md5'); $package1 = $this->createPackageMock(); $package1->expects($this->once())->method('getPrettyName')->will($this->returnValue('pkg1')); $this->setExpectedException('LogicException'); $locker->lockPackages(array($package1)); }