Closed mariusjp closed 2 years ago
Hm sorry I fail to see how this could be related to this bundle. Does the test pass without using this bundle?
Well, after losing a few hours of work yesterday trying to wrap my head around what was happening and starting up the next day (today)...
I did as you asked, ran the tests without your extension in the configuration file. Tests passed, re-added your extension... tests passed.
I have now re-run above statement multiple times and I don't have the error anymore. Sorry to have bothered you, but it really seemed related (as I couldn't think of anything else that influenced my tests)
I'm having a very weird issue:
In one of my tests I'm revoking a user related token, fetching all the tokens after the revoke and comparing the result to my expectations. This works fine, but my guess is this works fine because the update (revoke) is done with the querybuilder AND the "findAllActiveTokens" is done with the querybuilder.
Now onto my problem:
Same sort of test, revoke a (different) user related token, this is again done with the querybuilder to update. BUT retrieving the result is done with a "findOneBy" (this directly uses the entityManager in stead of the QueryBuilder). And my result is that the "revoke" has not been executed (but no error has been thrown).
I'm only mentioning the "difference" in the "findOneBy" and QueryBuilder approach because, as you can see, that is the only actual difference between the two scenarios.
A bit of code to make it more clear:
The first case, which works (the Repository):
And the test:
The second case, which doesn't work (the Repository):
And the test: