- Issue created by @coffeemakr
- Assigned to MacSim
- Status changed to Needs work
5 months ago 3:04pm 30 September 2024 - 🇫🇷France MacSim
Hi coffeemakr,
Nice catch ; I made the changes you suggested but I am struggling on the tests changes.
I'll commit this as soon as tests will be fixed - 🇫🇷France MacSim
Since we can't mock static calls with Prophecy we have to
-
Create a
canAnonymousAccessNode()
method/** * Tells if an anonymous user can access the node. * * @return bool * TRUE if the anonymous user can access the node, else FALSE. */ protected function canAnonymousAccessNode() { $anonymous_user = User::getAnonymousUser(); return $node->access('view', $anonymous_user); }
- Rewrite the whole Unit test class without Prophecy
-
Create a
- 🇫🇷France MacSim
Rewrote the tests to match what I said in #4 and merged it on 3.1.x
It would need a backport on other branches though