annotate 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
rev   line source
Chris@18 1 <?php
Chris@18 2
Chris@18 3 namespace Drupal\Tests\system\Traits;
Chris@18 4
Chris@18 5 /**
Chris@18 6 * A nothing trait, but declared in the Drupal\Tests namespace.
Chris@18 7 *
Chris@18 8 * We use this trait to test autoloading of traits outside of the normal test
Chris@18 9 * suite namespaces.
Chris@18 10 *
Chris@18 11 * @see \Drupal\Tests\system\Unit\TraitAccessTest
Chris@18 12 */
Chris@18 13 trait TestTrait {
Chris@18 14
Chris@18 15 /**
Chris@18 16 * Random string for a not very interesting trait.
Chris@18 17 *
Chris@18 18 * @var string
Chris@18 19 */
Chris@18 20 protected $stuff = 'stuff';
Chris@18 21
Chris@18 22 /**
Chris@18 23 * Return a test string to a trait user.
Chris@18 24 *
Chris@18 25 * @return string
Chris@18 26 * Just a random sort of string.
Chris@18 27 */
Chris@18 28 protected function getStuff() {
Chris@18 29 return $this->stuff;
Chris@18 30 }
Chris@18 31
Chris@18 32 }