Version 1
[yaffs-website] / web / core / modules / simpletest / tests / src / Traits / TestTrait.php
diff --git a/web/core/modules/simpletest/tests/src/Traits/TestTrait.php b/web/core/modules/simpletest/tests/src/Traits/TestTrait.php
new file mode 100644 (file)
index 0000000..eeac496
--- /dev/null
@@ -0,0 +1,32 @@
+<?php
+
+namespace Drupal\Tests\simpletest\Traits;
+
+/**
+ * A nothing trait, but declared in the Drupal\Tests namespace.
+ *
+ * We use this trait to test autoloading of traits outside of the normal test
+ * suite namespaces.
+ *
+ * @see \Drupal\Tests\simpletest\Unit\TraitAccessTest
+ */
+trait TestTrait {
+
+  /**
+   * Random string for a not very interesting trait.
+   *
+   * @var string
+   */
+  protected $stuff = 'stuff';
+
+  /**
+   * Return a test string to a trait user.
+   *
+   * @return string
+   *   Just a random sort of string.
+   */
+  protected function getStuff() {
+    return $this->stuff;
+  }
+
+}