{"action":"closed","issue":{"url":"https://api.github.com/repos/sebastianbergmann/phpunit/issues/3270","repository_url":"https://api.github.com/repos/sebastianbergmann/phpunit","labels_url":"https://api.github.com/repos/sebastianbergmann/phpunit/issues/3270/labels{/name}","comments_url":"https://api.github.com/repos/sebastianbergmann/phpunit/issues/3270/comments","events_url":"https://api.github.com/repos/sebastianbergmann/phpunit/issues/3270/events","html_url":"https://github.com/sebastianbergmann/phpunit/issues/3270","id":357150935,"node_id":"MDU6SXNzdWUzNTcxNTA5MzU=","number":3270,"title":"Array / Object to string conversion in NamePrettifier","user":{"login":"sebastianbergmann","id":25218,"node_id":"MDQ6VXNlcjI1MjE4","avatar_url":"https://avatars1.githubusercontent.com/u/25218?v=4","gravatar_id":"","url":"https://api.github.com/users/sebastianbergmann","html_url":"https://github.com/sebastianbergmann","followers_url":"https://api.github.com/users/sebastianbergmann/followers","following_url":"https://api.github.com/users/sebastianbergmann/following{/other_user}","gists_url":"https://api.github.com/users/sebastianbergmann/gists{/gist_id}","starred_url":"https://api.github.com/users/sebastianbergmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebastianbergmann/subscriptions","organizations_url":"https://api.github.com/users/sebastianbergmann/orgs","repos_url":"https://api.github.com/users/sebastianbergmann/repos","events_url":"https://api.github.com/users/sebastianbergmann/events{/privacy}","received_events_url":"https://api.github.com/users/sebastianbergmann/received_events","type":"User","site_admin":false},"labels":[{"id":44001,"node_id":"MDU6TGFiZWw0NDAwMQ==","url":"https://api.github.com/repos/sebastianbergmann/phpunit/labels/bug","name":"bug","color":"e11d21","default":true}],"state":"closed","locked":false,"assignee":{"login":"sebastianbergmann","id":25218,"node_id":"MDQ6VXNlcjI1MjE4","avatar_url":"https://avatars1.githubusercontent.com/u/25218?v=4","gravatar_id":"","url":"https://api.github.com/users/sebastianbergmann","html_url":"https://github.com/sebastianbergmann","followers_url":"https://api.github.com/users/sebastianbergmann/followers","following_url":"https://api.github.com/users/sebastianbergmann/following{/other_user}","gists_url":"https://api.github.com/users/sebastianbergmann/gists{/gist_id}","starred_url":"https://api.github.com/users/sebastianbergmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebastianbergmann/subscriptions","organizations_url":"https://api.github.com/users/sebastianbergmann/orgs","repos_url":"https://api.github.com/users/sebastianbergmann/repos","events_url":"https://api.github.com/users/sebastianbergmann/events{/privacy}","received_events_url":"https://api.github.com/users/sebastianbergmann/received_events","type":"User","site_admin":false},"assignees":[{"login":"sebastianbergmann","id":25218,"node_id":"MDQ6VXNlcjI1MjE4","avatar_url":"https://avatars1.githubusercontent.com/u/25218?v=4","gravatar_id":"","url":"https://api.github.com/users/sebastianbergmann","html_url":"https://github.com/sebastianbergmann","followers_url":"https://api.github.com/users/sebastianbergmann/followers","following_url":"https://api.github.com/users/sebastianbergmann/following{/other_user}","gists_url":"https://api.github.com/users/sebastianbergmann/gists{/gist_id}","starred_url":"https://api.github.com/users/sebastianbergmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebastianbergmann/subscriptions","organizations_url":"https://api.github.com/users/sebastianbergmann/orgs","repos_url":"https://api.github.com/users/sebastianbergmann/repos","events_url":"https://api.github.com/users/sebastianbergmann/events{/privacy}","received_events_url":"https://api.github.com/users/sebastianbergmann/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-09-05T09:50:06Z","updated_at":"2018-09-05T09:52:35Z","closed_at":"2018-09-05T09:52:35Z","author_association":"OWNER","body":"```php\r\n<?php\r\nclass ExampleTest extends PHPUnit\\Framework\\TestCase\r\n{\r\n    /**\r\n     * @dataProvider placeHolderprovider\r\n     * @testdox ... $value ...\r\n     */\r\n    public function testWithPlaceholders($value): void\r\n    {\r\n        $this->assertTrue(true);\r\n    }\r\n\r\n    public function placeHolderprovider(): array\r\n    {\r\n        return [\r\n            'boolean'          => [true],\r\n            'integer'          => [1],\r\n            'float'            => [1.0],\r\n            'string'           => ['string'],\r\n            'array'            => [[1, 2, 3]],\r\n            'object'           => [new \\stdClass],\r\n            'stringableObject' => [new class {\r\n                public function __toString()\r\n                {\r\n                    return 'string';\r\n                }\r\n            }],\r\n            'resource'         => [\\fopen(__FILE__, 'rb')],\r\n            'null'             => [null]\r\n        ];\r\n    }\r\n}\r\n```\r\n#### Actual\r\n```\r\nPHPUnit 7.3.3 by Sebastian Bergmann and contributors.\r\n\r\nExample\r\n ✔ ... 1 ...\r\n ✔ ... 1 ...\r\n ✔ ... 1 ...\r\n ✔ ... string ...\r\nPHP Notice:  Array to string conversion in /usr/local/src/phpunit/src/Util/TestDox/NamePrettifier.php on line 76\r\nPHP Stack trace:\r\nPHP   1. {main}() /usr/local/src/phpunit/phpunit:0\r\nPHP   2. PHPUnit\\TextUI\\Command::main() /usr/local/src/phpunit/phpunit:53\r\nPHP   3. PHPUnit\\TextUI\\Command->run() /usr/local/src/phpunit/src/TextUI/Command.php:159\r\nPHP   4. PHPUnit\\TextUI\\TestRunner->doRun() /usr/local/src/phpunit/src/TextUI/Command.php:203\r\nPHP   5. PHPUnit\\Framework\\TestSuite->run() /usr/local/src/phpunit/src/TextUI/TestRunner.php:587\r\nPHP   6. PHPUnit\\Framework\\DataProviderTestSuite->run() /usr/local/src/phpunit/src/Framework/TestSuite.php:750\r\nPHP   7. ExampleTest->run() /usr/local/src/phpunit/src/Framework/TestSuite.php:750\r\nPHP   8. PHPUnit\\Framework\\TestResult->run() /usr/local/src/phpunit/src/Framework/TestCase.php:798\r\nPHP   9. PHPUnit\\Framework\\TestResult->startTest() /usr/local/src/phpunit/src/Framework/TestResult.php:603\r\nPHP  10. PHPUnit\\Util\\TestDox\\CliTestDoxPrinter->startTest() /usr/local/src/phpunit/src/Framework/TestResult.php:395\r\nPHP  11. PHPUnit\\Util\\TestDox\\NamePrettifier->prettifyTestCase() /usr/local/src/phpunit/src/Util/TestDox/CliTestDoxPrinter.php:66\r\nPHP  12. str_replace() /usr/local/src/phpunit/src/Util/TestDox/NamePrettifier.php:76\r\n ✔ ... Array ...\r\nPHP Catchable fatal error:  Object of class stdClass could not be converted to string in /usr/local/src/phpunit/src/Util/TestDox/NamePrettifier.php on line 76\r\nPHP Stack trace:\r\nPHP   1. {main}() /usr/local/src/phpunit/phpunit:0\r\nPHP   2. PHPUnit\\TextUI\\Command::main() /usr/local/src/phpunit/phpunit:53\r\nPHP   3. PHPUnit\\TextUI\\Command->run() /usr/local/src/phpunit/src/TextUI/Command.php:159\r\nPHP   4. PHPUnit\\TextUI\\TestRunner->doRun() /usr/local/src/phpunit/src/TextUI/Command.php:203\r\nPHP   5. PHPUnit\\Framework\\TestSuite->run() /usr/local/src/phpunit/src/TextUI/TestRunner.php:587\r\nPHP   6. PHPUnit\\Framework\\DataProviderTestSuite->run() /usr/local/src/phpunit/src/Framework/TestSuite.php:750\r\nPHP   7. ExampleTest->run() /usr/local/src/phpunit/src/Framework/TestSuite.php:750\r\nPHP   8. PHPUnit\\Framework\\TestResult->run() /usr/local/src/phpunit/src/Framework/TestCase.php:798\r\nPHP   9. PHPUnit\\Framework\\TestResult->startTest() /usr/local/src/phpunit/src/Framework/TestResult.php:603\r\nPHP  10. PHPUnit\\Util\\TestDox\\CliTestDoxPrinter->startTest() /usr/local/src/phpunit/src/Framework/TestResult.php:395\r\nPHP  11. PHPUnit\\Util\\TestDox\\NamePrettifier->prettifyTestCase() /usr/local/src/phpunit/src/Util/TestDox/CliTestDoxPrinter.php:66\r\nPHP  12. str_replace() /usr/local/src/phpunit/src/Util/TestDox/NamePrettifier.php:76\r\n```\r\n#### Expected\r\n```\r\nPHPUnit 7.3.3 by Sebastian Bergmann and contributors.\r\n\r\nExample\r\n ✔ ... true ...\r\n ✔ ... 1 ...\r\n ✔ ... 1.0 ...\r\n ✔ ... string ...\r\n ✔ ... array ...\r\n ✔ ... object ...\r\n ✔ ... string ...\r\n ✔ ... resource ...\r\n ✔ ... NULL ...\r\n\r\nTime: 31 ms, Memory: 4.00MB\r\n\r\nOK (9 tests, 9 assertions)\r\n```\r\n"}}
{"actor":{"display_login":"sebastianbergmann"}}