You are here

class StringObject in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Component/Assertion/InspectorTest.php \Drupal\Tests\Component\Assertion\StringObject
  2. 10 core/tests/Drupal/Tests/Component/Assertion/InspectorTest.php \Drupal\Tests\Component\Assertion\StringObject

Quick class for testing for objects with __toString.

Hierarchy

Expanded class hierarchy of StringObject

File

core/tests/Drupal/Tests/Component/Assertion/InspectorTest.php, line 258
Contains \Drupal\Tests\Component\Assertion\InspectorTest.

Namespace

Drupal\Tests\Component\Assertion
View source
class StringObject {

  /**
   * {@inheritdoc}
   */
  public function __toString() {
    return 'foo';
  }

}

Members