diff options
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Unit/NamespaceUriFinderTest.php')
-rw-r--r-- | www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Unit/NamespaceUriFinderTest.php | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Unit/NamespaceUriFinderTest.php b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Unit/NamespaceUriFinderTest.php new file mode 100644 index 00000000..60f1f38d --- /dev/null +++ b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Unit/NamespaceUriFinderTest.php @@ -0,0 +1,50 @@ +<?php + +namespace SMW\Tests; + +use SMW\NamespaceUriFinder; + +/** + * @covers \SMW\NamespaceUriFinder + * @group semantic-mediawiki + * + * @license GNU GPL v2+ + * @since 2.4 + * + * @author mwjames + */ +class NamespaceUriFinderTest extends \PHPUnit_Framework_TestCase { + + /** + * @dataProvider namespaceProvider + */ + public function testGetUriForNamespaceKey( $key, $expected ) { + $this->assertInternalType( + $expected, + NamespaceUriFinder::getUri( $key ) + ); + } + + public function namespaceProvider() { + + $provider[] = [ + 'Foo', + 'boolean' + ]; + + $ns = [ + 'owl', 'rdf', 'rdfs', 'swivt', 'xsd', 'skos', 'foaf', 'dc', + 'OWL' + ]; + + foreach ( $ns as $key ) { + $provider[] = [ + $key, + 'string' + ]; + } + + return $provider; + } + +} |