Respect\Validation\Exceptions\ValidationExceptionTest::providerForStringify PHP Method

providerForStringify() public method

    public function providerForStringify()
    {
        $object1 = new SplFileInfo('stringify.phpt');
        // __toString()
        $object2 = new DateTime('1988-09-09 23:59:59');
        $object3 = new stdClass();
        $object4 = new stdClass();
        $object4->foo = 1;
        $object4->bar = false;
        $object5 = new stdClass();
        $objectRecursive = $object5;
        for ($i = 0; $i < 10; ++$i) {
            $objectRecursive->name = new stdClass();
            $objectRecursive = $objectRecursive->name;
        }
        $exception = new Exception('My message');
        $iterator1 = new ArrayIterator([1, 2, 3]);
        $iterator2 = new ArrayIterator(['a' => 1, 'b' => 2, 'c' => 3]);
        return [['', '""'], ['foo', '"foo"'], [INF, 'INF'], [-INF, '-INF'], [acos(4), 'NaN'], [123, '123'], [123.456, '123.456'], [[], '{ }'], [[false], '{ false }'], [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], '{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }'], [range(1, 80), '{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ... }'], [['foo' => true, 'bar' => ['baz' => 123, 'qux' => [1, 2, 3]]], '{ "foo": true, "bar": { "baz": 123, "qux": { 1, 2, 3 } } }'], [['foo' => true, 'bar' => ['baz' => 123, 'qux' => ['norf' => [1, 2, 3]]]], '{ "foo": true, "bar": { "baz": 123, "qux": { "norf": ... } } }'], [[[], 'foo'], '{ { }, "foo" }'], [[[1], 'foo'], '{ { 1 }, "foo" }'], [[1, [2, [3]]], '{ 1, { 2, { 3 } } }'], [[1, [2, [3, [4]]]], '{ 1, { 2, { 3, ... } } }'], [[1, [2, [3, [4, [5]]]]], '{ 1, { 2, { 3, ... } } }'], [['foo', 'bar'], '{ "foo", "bar" }'], [['foo', -1], '{ "foo", -1 }'], [$object1, '"stringify.phpt"'], [$object2, sprintf('"%s"', $object2->format('Y-m-d H:i:s'))], [$object3, '`[object] (stdClass: { })`'], [$object4, '`[object] (stdClass: { "foo": 1, "bar": false })`'], [$object5, '`[object] (stdClass: { "name": [object] (stdClass: ...) })`'], [$exception, '`[exception] (Exception: { "message": "My message", "code": 0, "file": "%s:%d" })`'], [$iterator1, '`[traversable] (ArrayIterator: { 1, 2, 3 })`'], [$iterator2, '`[traversable] (ArrayIterator: { "a": 1, "b": 2, "c": 3 })`'], [stream_context_create(), '`[resource] (stream-context)`'], [tmpfile(), '`[resource] (stream)`'], [xml_parser_create(), '`[resource] (xml)`'], [[$object4, [42, 43], true, null, tmpfile()], '{ `[object] (stdClass: { "foo": 1, "bar": false })`, { 42, 43 }, true, null, `[resource] (stream)` }']];
    }