Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract storeAssertDiff from Dumper::dumpException #382

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

trejjam
Copy link
Contributor

@trejjam trejjam commented Jan 2, 2018

  • 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.

@trejjam
Copy link
Contributor Author

trejjam commented May 30, 2018

Hi @milo,
are there any opinions on this?

@milo
Copy link
Member

milo commented May 31, 2018

I'll check it during next week.

@milo
Copy link
Member

milo commented May 31, 2018

Btw what the purpose is?

@trejjam
Copy link
Contributor Author

trejjam commented May 31, 2018

I use it with mango tester to store a diff.

@dg dg force-pushed the master branch 2 times, most recently from b9711f5 to 3f273cf Compare June 7, 2018 11:24
@milo
Copy link
Member

milo commented Jun 13, 2018

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.

@trejjam
Copy link
Contributor Author

trejjam commented Jun 13, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants