-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
feat: document resetting all collected messages in setUp #77
base: 1.x
Are you sure you want to change the base?
Conversation
TestTransport use static properties, that are not resetted between tests event when Symfony Kernel is rebooted.
Hi @benito103e these properties are reset between tests (or at least, they should be 😅) This behavior is tested here: Do your test suite actually shutdown the kernel between each other? (maybe |
Hi @nikophil, You're right, these properties are reset after a test that implements InteractsWithMessenger but not after a test that doesn't.
|
Maybe we should add a |
ok you're right, that's a bug 😅 Maybe a |
I know we had complex problems around this in the past. @kbond any clue why we don't call these methods before each test? TestTransport::resetAll();
TestBus::resetAll(); |
Ahah I can easily push the "before" modification but it's going to be a bit tricky for the associated automatic test... |
I think the problem was around blocking/intercepting. maybe the easiest thing to do would be to initialize as well |
@nikophil I agree, this would be equivalent to calling |
I think what would be ideal is having the test transport behave exactly like the Maybe not exactly like in memory - we'd probably want to take into account the default transport config. (ie |
@kbond InMemoryTransport uses object properties. While TestTransport uses static class properties. |
Yep, my thought was to mimic the |
Hey! I've thought a little bit more to this problem What if we make At first I was thinking it would call WDYT? |
TestTransport use static properties, that are not resetted between tests event when Symfony Kernel is rebooted.