Extract storeAssertDiff from Dumper::dumpException
- bug fix? no
- new feature? yes
- BC break? no
This refactor Dumper::dumpException in the way that part maintaining storing Assert diff is callable from other test libraries.
Hi @milo, are there any opinions on this?
I'll check it during next week.
Btw what the purpose is?
I use it with mango tester to store a diff.
Thanks for rebase!
Your storeAssertDiff() does two things. Translates exception into message and creates dump files (arg reference is not nice public API). Do you need both?
I know mango flavoured Tester, but not its source code in detail. Could you elaborate more in detail why do you need extract this functionality? From your description it looks like you only need to remove @internal from saveOutput() method.
The storing part is what I would like to port into Mango tester.
It uses own TestCase, where the only message about assert fault is reported, not simple fault then require xDebug or the other inspection method.
What about removing @internal or simplifying PR to move only logic in https://github.com/nette/tester/blob/master/src/Framework/Dumper.php#L264 and make it publicly callable?
You are right that storeAssertDiff API is not good enough.