/** * @test */ public function returnsNullWhenNoParentLocaleCouldBeFound() { foreach ($this->locales as $locale) { $this->localeCollection->addLocale($locale); } $this->assertNull($this->localeCollection->getParentLocaleOf(new \TYPO3\FLOW3\I18n\Locale('sv'))); $this->assertNull($this->localeCollection->getParentLocaleOf($this->locales[0])); }
/** * Returns a parent Locale object of the locale provided. * * @param \TYPO3\FLOW3\I18n\Locale $locale The Locale to search parent for * @return \TYPO3\FLOW3\I18n\Locale Existing \TYPO3\FLOW3\I18n\Locale instance or NULL on failure * @api */ public function getParentLocaleOf(\TYPO3\FLOW3\I18n\Locale $locale) { return $this->localeCollection->getParentLocaleOf($locale); }