summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Unit/SQLStore/QueryDependencyLinksStoreFactoryTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Unit/SQLStore/QueryDependencyLinksStoreFactoryTest.php')
-rw-r--r--www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Unit/SQLStore/QueryDependencyLinksStoreFactoryTest.php96
1 files changed, 96 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Unit/SQLStore/QueryDependencyLinksStoreFactoryTest.php b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Unit/SQLStore/QueryDependencyLinksStoreFactoryTest.php
new file mode 100644
index 00000000..7f38b995
--- /dev/null
+++ b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Unit/SQLStore/QueryDependencyLinksStoreFactoryTest.php
@@ -0,0 +1,96 @@
+<?php
+
+namespace SMW\Tests\SQLStore;
+
+use SMW\SQLStore\QueryDependencyLinksStoreFactory;
+
+/**
+ * @covers \SMW\SQLStore\QueryDependencyLinksStoreFactory
+ * @group semantic-mediawiki
+ *
+ * @license GNU GPL v2+
+ * @since 2.4
+ *
+ * @author mwjames
+ */
+class QueryDependencyLinksStoreFactoryTest extends \PHPUnit_Framework_TestCase {
+
+ public function testCanConstruct() {
+
+ $this->assertInstanceOf(
+ '\SMW\SQLStore\QueryDependencyLinksStoreFactory',
+ new QueryDependencyLinksStoreFactory()
+ );
+ }
+
+ public function testCanConstructQueryResultDependencyListResolver() {
+
+ $instance = new QueryDependencyLinksStoreFactory();
+
+ $this->assertInstanceOf(
+ '\SMW\SQLStore\QueryDependency\QueryResultDependencyListResolver',
+ $instance->newQueryResultDependencyListResolver()
+ );
+ }
+
+ public function testCanConstructQueryDependencyLinksStore() {
+
+ $store = $this->getMockBuilder( '\SMW\Store' )
+ ->disableOriginalConstructor()
+ ->getMockForAbstractClass();
+
+ $instance = new QueryDependencyLinksStoreFactory();
+
+ $this->assertInstanceOf(
+ '\SMW\SQLStore\QueryDependency\QueryDependencyLinksStore',
+ $instance->newQueryDependencyLinksStore( $store )
+ );
+ }
+
+ public function testCanConstructEntityIdListRelevanceDetectionFilter() {
+
+ $store = $this->getMockBuilder( '\SMW\Store' )
+ ->disableOriginalConstructor()
+ ->getMockForAbstractClass();
+
+ $changeOp = $this->getMockBuilder( '\SMW\SQLStore\ChangeOp\ChangeOp' )
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $instance = new QueryDependencyLinksStoreFactory();
+
+ $this->assertInstanceOf(
+ '\SMW\SQLStore\QueryDependency\EntityIdListRelevanceDetectionFilter',
+ $instance->newEntityIdListRelevanceDetectionFilter( $store, $changeOp )
+ );
+ }
+
+ public function testCanConstructQueryReferenceBacklinks() {
+
+ $store = $this->getMockBuilder( '\SMW\Store' )
+ ->disableOriginalConstructor()
+ ->getMockForAbstractClass();
+
+ $instance = new QueryDependencyLinksStoreFactory();
+
+ $this->assertInstanceOf(
+ '\SMW\SQLStore\QueryDependency\QueryReferenceBacklinks',
+ $instance->newQueryReferenceBacklinks( $store )
+ );
+ }
+
+ public function testCanConstructDependencyLinksUpdateJournal() {
+
+ $store = $this->getMockBuilder( '\SMW\Store' )
+ ->disableOriginalConstructor()
+ ->getMockForAbstractClass();
+
+ $instance = new QueryDependencyLinksStoreFactory();
+
+ $this->assertInstanceOf(
+ '\SMW\SQLStore\QueryDependency\DependencyLinksUpdateJournal',
+ $instance->newDependencyLinksUpdateJournal()
+ );
+ }
+
+}