public function getPackage($packageKey) { if (!$this->isPackageAvailable($packageKey)) { throw new Exception\UnknownPackageException('Package "' . $packageKey . '" is not available. Please check if the package exists and that the package key is correct (package keys are case sensitive).', 1166546734); } return $this->packages[$packageKey]; }
/** * @test * @expectedException \Neos\Flow\Package\Exception\UnknownPackageException */ public function getPackageThrowsExceptionOnUnknownPackage() { $this->packageManager->getPackage('PrettyUnlikelyThatThisPackageExists'); }