Discussion of testing theory and practice, including methodologies (such as TDD, BDD, DDD, Agile, XP) and software - anything to do with testing goes here. (Formerly "The Testing Side of Development")
Fail: OF/Testing/TestOfClassEnc.php -> TestOfEnc -> testStrPad -> Equal expectation fails at character 13 with [<IñtërnëT>] and [<IñtërnëT> ] at [/osis/lib/code/php/OF/Testing/TestOfClassEnc.php line 53
Obviously its really difficult to see what the difference is because the browser removes whitespace. So what I'd like to do is modify the reporter to output each character as a list item with some special whitespace characters highlighted somehow. Like this:
Fail: OF/Testing/TestOfClassEnc.php -> TestOfEnc -> testStrPad -> Equal expectation fails at character 13 with [<|I|ñ|t|ë|r|n|ë|T|>] and [<|I|ñ|t|ë|r|n|ë|T|>|sp|\n] at [/osis/lib/code/php/OF/Testing/TestOfClassEnc.php line 53
Only it'll be better because it'll be formatted with HTML and CSS
I've had a look at the source code and I'm damned if I can work out where to go to change this stuff.
Edit: uh no there's no way I can modify this, its written so as to be complete unmodifyable!
_describeStringDifference() is called by describeDifference() which is called from 7 different places and is escaped somewher so you can't add any HTML.
ole wrote:Edit: uh no there's no way I can modify this, its written so as to be complete unmodifyable!
_describeStringDifference() is called by describeDifference() which is called from 7 different places and is escaped somewher so you can't add any HTML.
Yeah, sorry . The system of error messages needs a bit of a rethink...or even a think. It's a gnarly bit that grew of it's own accord. Mail me the kind of thing you want to happen, so that I can incorporate it in the next release.
My biggest problem is how to make the dumper type stuff overrideabe without complicating the testing interface. One option is something really crude like...
...but that won't survive the first refactor. If I can build a language of things people want to do, I can then decompose Dumper into something that easier to change. Hence why I need you to describe the problem .