{"action":"created","issue":{"url":"https://api.github.com/repos/liip/LiipFunctionalTestBundle/issues/219","repository_url":"https://api.github.com/repos/liip/LiipFunctionalTestBundle","labels_url":"https://api.github.com/repos/liip/LiipFunctionalTestBundle/issues/219/labels{/name}","comments_url":"https://api.github.com/repos/liip/LiipFunctionalTestBundle/issues/219/comments","events_url":"https://api.github.com/repos/liip/LiipFunctionalTestBundle/issues/219/events","html_url":"https://github.com/liip/LiipFunctionalTestBundle/issues/219","id":126683486,"number":219,"title":"runCommand(): use CommandTester (Enhancement)","user":{"login":"Aerendir","id":1968622,"avatar_url":"https://avatars.githubusercontent.com/u/1968622?v=3","gravatar_id":"","url":"https://api.github.com/users/Aerendir","html_url":"https://github.com/Aerendir","followers_url":"https://api.github.com/users/Aerendir/followers","following_url":"https://api.github.com/users/Aerendir/following{/other_user}","gists_url":"https://api.github.com/users/Aerendir/gists{/gist_id}","starred_url":"https://api.github.com/users/Aerendir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Aerendir/subscriptions","organizations_url":"https://api.github.com/users/Aerendir/orgs","repos_url":"https://api.github.com/users/Aerendir/repos","events_url":"https://api.github.com/users/Aerendir/events{/privacy}","received_events_url":"https://api.github.com/users/Aerendir/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/liip/LiipFunctionalTestBundle/labels/verified","name":"verified","color":"ededed"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-01-14T15:54:55Z","updated_at":"2016-10-10T12:11:31Z","closed_at":null,"body":"I'm trying to use the `WebTestCase::runCommand()` method.\r\n\r\nI have yet implemented my unit test to test command, but, as I've anyway extend `WebTestBundle` to load fixtures, I like to also use other useful methods that the bundle provides.\r\nSo II'd like to rewrite my tests to use those methods.\r\n\r\nNow I'm working on a command and seen the code of the method `WebTestCase::runCommand()`.\r\n\r\nI noted it doesn't use the helpful `Symfony\\Component\\Console\\Tester\\CommandTester()` class: is there a reason for this? Or may be the `CommandTester` class were released after the `WebTestCase::runCommand()`?\r\n\r\nCan someone help me understand?"},"comment":{"url":"https://api.github.com/repos/liip/LiipFunctionalTestBundle/issues/comments/252600708","html_url":"https://github.com/liip/LiipFunctionalTestBundle/issues/219#issuecomment-252600708","issue_url":"https://api.github.com/repos/liip/LiipFunctionalTestBundle/issues/219","id":252600708,"user":{"login":"giosh94mhz","id":5219975,"avatar_url":"https://avatars.githubusercontent.com/u/5219975?v=3","gravatar_id":"","url":"https://api.github.com/users/giosh94mhz","html_url":"https://github.com/giosh94mhz","followers_url":"https://api.github.com/users/giosh94mhz/followers","following_url":"https://api.github.com/users/giosh94mhz/following{/other_user}","gists_url":"https://api.github.com/users/giosh94mhz/gists{/gist_id}","starred_url":"https://api.github.com/users/giosh94mhz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giosh94mhz/subscriptions","organizations_url":"https://api.github.com/users/giosh94mhz/orgs","repos_url":"https://api.github.com/users/giosh94mhz/repos","events_url":"https://api.github.com/users/giosh94mhz/events{/privacy}","received_events_url":"https://api.github.com/users/giosh94mhz/received_events","type":"User","site_admin":false},"created_at":"2016-10-10T12:11:31Z","updated_at":"2016-10-10T12:11:31Z","body":"This would be a cool addition, since with the current `runCommand` there is no status code returned.\r\n\r\nHere's what I did:\r\n\r\n```php\r\n    $tester = new CommandTester($this->command);\r\n    $this->assertEquals($this->command->getName(), 'my:name');\r\n    $this->assertEquals(0, $tester->execute());\r\n    $output = $tester->getOutput();\r\n```\r\n"}}
{"actor":{"display_login":"giosh94mhz"}}