summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Utils/Fixtures/Properties/CityCategory.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Utils/Fixtures/Properties/CityCategory.php')
-rw-r--r--www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Utils/Fixtures/Properties/CityCategory.php45
1 files changed, 45 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Utils/Fixtures/Properties/CityCategory.php b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Utils/Fixtures/Properties/CityCategory.php
new file mode 100644
index 00000000..eb27d661
--- /dev/null
+++ b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Utils/Fixtures/Properties/CityCategory.php
@@ -0,0 +1,45 @@
+<?php
+
+namespace SMW\Tests\Utils\Fixtures\Properties;
+
+use SMW\DataValueFactory;
+use SMW\DIProperty;
+use SMW\DIWiKiPage;
+
+/**
+ * @license GNU GPL v2+
+ * @since 2.1
+ *
+ * @author mwjames
+ */
+class CityCategory extends FixtureProperty {
+
+ /**
+ * @since 2.1
+ */
+ public function __construct() {
+ $this->property = new DIProperty( '_INST' );
+ }
+
+ /**
+ * @since 2.1
+ *
+ * @return DIWiKiPage
+ */
+ public function asSubject() {
+ return new DIWiKiPage( 'City', NS_CATEGORY );
+ }
+
+ /**
+ * @since 2.1
+ *
+ * @return DataValue
+ */
+ public function getCategoryValue() {
+ return DataValueFactory::getInstance()->newDataValueByItem(
+ $this->asSubject(),
+ $this->getProperty()
+ );
+ }
+
+}