summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Utils/Fixtures/Properties/PopulationDensityProperty.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Utils/Fixtures/Properties/PopulationDensityProperty.php')
-rw-r--r--www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Utils/Fixtures/Properties/PopulationDensityProperty.php48
1 files changed, 48 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Utils/Fixtures/Properties/PopulationDensityProperty.php b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Utils/Fixtures/Properties/PopulationDensityProperty.php
new file mode 100644
index 00000000..b9e65009
--- /dev/null
+++ b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Utils/Fixtures/Properties/PopulationDensityProperty.php
@@ -0,0 +1,48 @@
+<?php
+
+namespace SMW\Tests\Utils\Fixtures\Properties;
+
+use SMW\DIProperty;
+use SMW\SemanticData;
+use SMWDIBlob as DIBlob;
+
+/**
+ * @license GNU GPL v2+
+ * @since 2.1
+ *
+ * @author mwjames
+ */
+class PopulationDensityProperty extends FixtureProperty {
+
+ /**
+ * @since 2.1
+ */
+ public function __construct() {
+ $this->property = DIProperty::newFromUserLabel( 'Population density' );
+ $this->property->setPropertyTypeId( '_rec' );
+ }
+
+ /**
+ * @since 2.1
+ *
+ * @return SemanticData
+ */
+ public function getDependencies() {
+
+ $semanticData = parent::getDependencies();
+
+ $populationProperty = new PopulationProperty();
+ $areaProperty = new AreaProperty();
+
+ $semanticData->addPropertyObjectValue(
+ new DIProperty( '_LIST' ),
+ new DIBlob(
+ $populationProperty->getProperty()->getKey() . ';' .
+ $areaProperty->getProperty()->getKey()
+ )
+ );
+
+ return $semanticData;
+ }
+
+}