/** * Returns a PackageInterface object for the specified package. * A package is available, if the package directory contains valid MetaData information. * * @param string $packageKey * @return \TYPO3\Flow\Package\PackageInterface The requested package object * @throws \TYPO3\Flow\Package\Exception\UnknownPackageException if the specified package is not known * @api */ public function getPackage($packageKey) { if (isset($this->packageAliasMap[$lowercasedPackageKey = strtolower($packageKey)])) { $packageKey = $this->packageAliasMap[$lowercasedPackageKey]; } return parent::getPackage($packageKey); }
/** * @test * @expectedException \TYPO3\Flow\Package\Exception\UnknownPackageException */ public function getPackageThrowsExceptionOnUnknownPackage() { $this->packageManager->getPackage('PrettyUnlikelyThatThisPackageExists'); }