class StringObject

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Component/Assertion/InspectorTest.php \Drupal\Tests\Component\Assertion\StringObject
  2. 8.9.x core/tests/Drupal/Tests/Component/Assertion/InspectorTest.php \Drupal\Tests\Component\Assertion\StringObject
  3. 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 246

Namespace

Drupal\Tests\Component\Assertion
View source
class StringObject {
    
    /**
     * {@inheritdoc}
     */
    public function __toString() {
        return 'foo';
    }

}

Members

Title Sort descending Modifiers Object type Summary
StringObject::__toString public function

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.