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