diff --git a/tests/VocabularyConfigTest.php b/tests/VocabularyConfigTest.php index ca7b88f9a..0e00b91b4 100644 --- a/tests/VocabularyConfigTest.php +++ b/tests/VocabularyConfigTest.php @@ -362,4 +362,21 @@ public function testGetTypesWhenNotSet() { $vocab = $this->model->getVocabulary('testdiff'); $this->assertEquals(array(), $vocab->getConfig()->getTypes('en')); } + + /** + * @covers VocabularyConfig::getLanguageOrder + */ + public function testGetLanguageOrderNotSet() { + $vocab = $this->model->getVocabulary('test'); + $this->assertEquals(array('en'), $vocab->getConfig()->getLanguageOrder('en')); + } + + /** + * @covers VocabularyConfig::getLanguageOrder + */ + public function testGetLanguageOrder() { + $vocab = $this->model->getVocabulary('subtag'); + $this->assertEquals(array('en', 'fr', 'de', 'sv'), $vocab->getConfig()->getLanguageOrder('en')); + $this->assertEquals(array('fi', 'fr', 'de', 'sv', 'en'), $vocab->getConfig()->getLanguageOrder('fi')); + } } diff --git a/tests/testvocabularies.ttl b/tests/testvocabularies.ttl index 5e824a2ea..dee85b9f7 100644 --- a/tests/testvocabularies.ttl +++ b/tests/testvocabularies.ttl @@ -179,6 +179,7 @@ void:uriSpace "http://www.skosmos.skos/subtag/"; void:sparqlEndpoint ; skosmos:language "en"; + skosmos:fallbackLanguages ( "fr" "de" "sv" ) ; skosmos:sparqlGraph ; skosmos:sparqlDialect "JenaText" .