diff options
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Utils/Fixtures/Properties/CapitalOfProperty.php')
-rw-r--r-- | www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Utils/Fixtures/Properties/CapitalOfProperty.php | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Utils/Fixtures/Properties/CapitalOfProperty.php b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Utils/Fixtures/Properties/CapitalOfProperty.php new file mode 100644 index 00000000..57f338df --- /dev/null +++ b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Utils/Fixtures/Properties/CapitalOfProperty.php @@ -0,0 +1,43 @@ +<?php + +namespace SMW\Tests\Utils\Fixtures\Properties; + +use SMW\DIProperty; +use SMW\SemanticData; + +/** + * @license GNU GPL v2+ + * @since 2.1 + * + * @author mwjames + */ +class CapitalOfProperty extends FixtureProperty { + + /** + * @since 2.1 + */ + public function __construct() { + $this->property = DIProperty::newFromUserLabel( 'Capital of' ); + $this->property->setPropertyTypeId( '_wpg' ); + } + + /** + * @since 2.1 + * + * @return SemanticData + */ + public function getDependencies() { + + $semanticData = parent::getDependencies(); + + $locatedInProperty = new LocatedInProperty(); + + $semanticData->addPropertyObjectValue( + new DIProperty( '_SUBP' ), + $locatedInProperty->getProperty()->getDiWikiPage() + ); + + return $semanticData; + } + +} |