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