{"action":"closed","issue":{"url":"https://api.github.com/repos/phpspec/phpspec/issues/658","labels_url":"https://api.github.com/repos/phpspec/phpspec/issues/658/labels{/name}","comments_url":"https://api.github.com/repos/phpspec/phpspec/issues/658/comments","events_url":"https://api.github.com/repos/phpspec/phpspec/issues/658/events","html_url":"https://github.com/phpspec/phpspec/issues/658","id":61533975,"number":658,"title":"Extended diff for mock call with exact parameters","user":{"login":"avant1","id":2902785,"avatar_url":"https://avatars.githubusercontent.com/u/2902785?v=3","gravatar_id":"","url":"https://api.github.com/users/avant1","html_url":"https://github.com/avant1","followers_url":"https://api.github.com/users/avant1/followers","following_url":"https://api.github.com/users/avant1/following{/other_user}","gists_url":"https://api.github.com/users/avant1/gists{/gist_id}","starred_url":"https://api.github.com/users/avant1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avant1/subscriptions","organizations_url":"https://api.github.com/users/avant1/orgs","repos_url":"https://api.github.com/users/avant1/repos","events_url":"https://api.github.com/users/avant1/events{/privacy}","received_events_url":"https://api.github.com/users/avant1/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/phpspec/phpspec/labels/feature","name":"feature","color":"02e10c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-14T09:50:23Z","updated_at":"2015-05-17T19:24:29Z","closed_at":"2015-05-17T19:24:29Z","body":"Hello.\r\n\r\nI think it would be nice if wrong mock call arguments (defined as exact values) could be outputed in a more detailed way.\r\nFor now, if exact value is string and it's length is more than 50 characters, only first 50 characters are displayed (even in verbose mode) for both expected and actual arguments (see https://github.com/phpspec/prophecy/blob/master/src/Prophecy/Util/StringUtil.php#L57)\r\nAnd we get output like\r\n```\r\n  18  ! it can handle event\r\n      method call:\r\n        Double\\Acme\\Context\\P2->set(\"data\", \"some really long string, containing more than 50 \"\r\n...)\r\n      was not expected.\r\n      Expected calls are:\r\n        - set(exact(\"data\"), exact(\"some really long string, containing more than 50 \"...))\r\n```\r\nwhich is pretty useless if difference between strings is after 50 character. Even if difference is in first characters, it is not always easy to find it, cause strings are not aligned:\r\n```\r\n  18  it can handle event\r\n      expected \"some really long strin, c\"..., but got \"some really long string, \"....\r\n\r\n      @@ -1,1 +1,1 @@\r\n      -some really long strin, containing more than 25 characters\r\n      +some really long string, containing more than 25 characters\r\n```\r\n\r\nIf I understand source code correctly, extended expected and actual arguments diff can be implemented as extension (via replacing default *formatter.presenter* by one which can detect `\\Prophecy\\Exception\\Call\\UnexpectedCallException`) and generating diffs for arguments.\r\n\r\nI found no existing extensions which implement similar functionality. I could try to create one.\r\nBut I think it makes sence to be implemented in core. What do you think?"}}