public function testCreationOfNotExistentLocale()
 {
     Dictionary::setFileLocation(__DIR__ . '/share/');
     $dictionary = Dictionary::factory('xx_XX');
     $this->assertAttributeEquals(array(), '_dictionary', $dictionary);
     $result = $dictionary->getPatternsForWord('Donaudampfschifffahrtskapitänsmütze');
     $this->assertEquals(array(), $result);
 }
 /**
  * Add a Dictionary to the Hyphenator
  *
  * @param \Org\Heigl\Hyphenator\Dictionary\Dictionary $dictionary The
  * Dictionary wit hyphenation-Patterns to add to this Hyphenator
  *
  * @return Org\Heigl\Hyphenator\Hyphenator
  */
 public function addDictionary($dictionary)
 {
     if (!$dictionary instanceof \Org\Heigl\Hyphenator\Dictionary\Dictionary) {
         \Org\Heigl\Hyphenator\Dictionary\Dictionary::setFileLocation($this->getHomePath() . '/files/dictionaries');
         $dictionary = \Org\Heigl\Hyphenator\Dictionary\Dictionary::factory($dictionary);
     }
     $this->_dicts->add($dictionary);
     return $this;
 }