diff options
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Unit/SPARQLStore/QueryEngine/DescriptionInterpreterFactoryTest.php')
-rw-r--r-- | www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Unit/SPARQLStore/QueryEngine/DescriptionInterpreterFactoryTest.php | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Unit/SPARQLStore/QueryEngine/DescriptionInterpreterFactoryTest.php b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Unit/SPARQLStore/QueryEngine/DescriptionInterpreterFactoryTest.php new file mode 100644 index 00000000..8e4be5e7 --- /dev/null +++ b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Unit/SPARQLStore/QueryEngine/DescriptionInterpreterFactoryTest.php @@ -0,0 +1,40 @@ +<?php + +namespace SMW\Tests\SPARQLStore\QueryEngine; + +use SMW\SPARQLStore\QueryEngine\DescriptionInterpreterFactory; + +/** + * @covers \SMW\SPARQLStore\QueryEngine\DescriptionInterpreterFactory + * @group semantic-mediawiki + * + * @license GNU GPL v2+ + * @since 2.5 + * + * @author mwjames + */ +class DescriptionInterpreterFactoryTest extends \PHPUnit_Framework_TestCase { + + public function testCanConstruct() { + + $this->assertInstanceOf( + '\SMW\SPARQLStore\QueryEngine\DescriptionInterpreterFactory', + new DescriptionInterpreterFactory() + ); + } + + public function testCanConstructDispatchingDescriptionInterpreter() { + + $conditionBuilder = $this->getMockBuilder( '\SMW\SPARQLStore\QueryEngine\ConditionBuilder' ) + ->disableOriginalConstructor() + ->getMock(); + + $instance = new DescriptionInterpreterFactory(); + + $this->assertInstanceOf( + '\SMW\SPARQLStore\QueryEngine\DescriptionInterpreters\DispatchingDescriptionInterpreter', + $instance->newDispatchingDescriptionInterpreter( $conditionBuilder ) + ); + } + +} |