view core/modules/simpletest/tests/src/Traits/TestTrait.php @ 9:1fc0ff908d1f

Add another data file
author Chris Cannam
date Mon, 05 Feb 2018 12:34:32 +0000
parents 4c8ae668cc8c
children
line wrap: on
line source
<?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;
  }

}