diff core/modules/system/tests/src/Traits/TestTrait.php @ 18:af1871eacc83

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:33:08 +0100
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/modules/system/tests/src/Traits/TestTrait.php	Thu May 09 15:33:08 2019 +0100
@@ -0,0 +1,32 @@
+<?php
+
+namespace Drupal\Tests\system\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\system\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;
+  }
+
+}