StringObject example

'with-string-and-boolean' => [['foo', FALSE], FALSE],
      'with-NULL' => [[NULL], FALSE],
      'string-with-NULL' => [['foo', NULL], FALSE],
      'integer' => [[1337], FALSE],
      'string-and-integer' => [['foo', 1337], FALSE],
      'double' => [[3.14], FALSE],
      'string-and-double' => [['foo', 3.14], FALSE],
      'array' => [[[]], FALSE],
      'string-and-array' => [['foo', []], FALSE],
      'string-and-nested-array' => [['foo', ['bar']], FALSE],
      'object' => [[new \stdClass()], FALSE],
      'string-and-object' => [['foo', new StringObject()], FALSE],
    ];

    return $data;
  }

  /** * Tests asserting all members are strings or objects with __toString(). * * @covers ::assertAllStringable */
  public function testAssertAllStringable() {
    
Home | Imprint | This part of the site doesn't use cookies.