{"action":"opened","issue":{"url":"https://api.github.com/repos/Codeception/Codeception/issues/3230","repository_url":"https://api.github.com/repos/Codeception/Codeception","labels_url":"https://api.github.com/repos/Codeception/Codeception/issues/3230/labels{/name}","comments_url":"https://api.github.com/repos/Codeception/Codeception/issues/3230/comments","events_url":"https://api.github.com/repos/Codeception/Codeception/issues/3230/events","html_url":"https://github.com/Codeception/Codeception/issues/3230","id":160704977,"number":3230,"title":"Diff should show only affected lines","user":{"login":"k0pernikus","id":436935,"avatar_url":"https://avatars.githubusercontent.com/u/436935?v=3","gravatar_id":"","url":"https://api.github.com/users/k0pernikus","html_url":"https://github.com/k0pernikus","followers_url":"https://api.github.com/users/k0pernikus/followers","following_url":"https://api.github.com/users/k0pernikus/following{/other_user}","gists_url":"https://api.github.com/users/k0pernikus/gists{/gist_id}","starred_url":"https://api.github.com/users/k0pernikus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k0pernikus/subscriptions","organizations_url":"https://api.github.com/users/k0pernikus/orgs","repos_url":"https://api.github.com/users/k0pernikus/repos","events_url":"https://api.github.com/users/k0pernikus/events{/privacy}","received_events_url":"https://api.github.com/users/k0pernikus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-06-16T16:31:31Z","updated_at":"2016-06-16T16:31:31Z","closed_at":null,"body":"Given these two strings:\r\n```\r\n$leExpectedXml = <<<XML\r\n<note>\r\n    <to>Tove</to>\r\n    <from>Jani</from>\r\n    <heading>Reminder</heading>\r\n    <body>Don't forget me this weekend!</body>\r\n</note>\r\nXML;\r\n\r\n$leActualXml = <<<XML\r\n<note>\r\n    <to>Tove</to>\r\n    <from>Jani</from>\r\n    <heading>Reminder\r\n    </heading>\r\n    <body>Don't forget me this weekend!</body>\r\n</note>\r\nXML;\r\n\r\nand running:\r\n\r\n$this->assertEquals(\r\n    $leExpectedXml,\r\n     $leActualXml,\r\n     'le xmls should be the same'\r\n);}\r\n```\r\n\r\nI get the output:\r\n\r\n```\r\nFail  Failed asserting that two strings are equal. ( -Expected | +Actual ) \r\n- '<note>\r\n-     <to>Tove</to>\r\n-     <from>Jani</from>\r\n-     <heading>Reminder</heading>\r\n-     <body>Don't forget me this weekend!</body>\r\n- </note>'\r\n+ '<note>\r\n+     <to>Tove</to>\r\n+     <from>Jani</from>\r\n+     <heading>Reminder\r\n+     </heading>\r\n+     <body>Don't forget me this weekend!</body>\r\n+ </note>'\r\n```\r\n\r\nI expect it to look like:\r\n\r\n```\r\n  --- Expected \r\n  +++ Actual\r\n  @@ @@\r\n   <note>\r\n       <to>Tove</to>\r\n       <from>Jani</from>\r\n  -    <heading>Reminder</heading>\r\n  +    <heading>Reminder\r\n  +    </heading>\r\n       <body>Don't forget me this weekend!</body>\r\n   </note>\r\n```\r\n\r\nI am going to work on a pull request for this as requested by @Naktibalda on [a related stackoverflow question](http://stackoverflow.com/questions/37858060/how-to-get-more-readable-diff-for-codeception-asserteequals-string). "}}
{"actor":{"display_login":"k0pernikus"}}