ZF-Commons / zfc-rbac

Role-based access control module to provide additional features on top of Zend\Permissions\Rbac
BSD 3-Clause "New" or "Revised" License
181 stars 111 forks source link

stop propagation only after MvcEvent::EVENT_DISPATCH_ERROR #358

Closed svycka closed 7 years ago

svycka commented 7 years ago

because only one listener would be triggered should fix https://github.com/ZF-Commons/zfc-rbac/issues/357

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.08%) to 92.9% when pulling bb292776d7d6f254f2b4ace2c6ddf087c79de524 on svycka:hotfix/issue-357 into 7344374417fe50c06ef596848c5813ed4a739ac3 on ZF-Commons:master.

prolic commented 7 years ago

Can you add a test-case for this, please?

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.1%) to 92.943% when pulling 320a83130d2dc62d090eea310d4d3350a9d8a4e9 on svycka:hotfix/issue-357 into 7344374417fe50c06ef596848c5813ed4a739ac3 on ZF-Commons:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.1%) to 92.943% when pulling 320a83130d2dc62d090eea310d4d3350a9d8a4e9 on svycka:hotfix/issue-357 into 7344374417fe50c06ef596848c5813ed4a739ac3 on ZF-Commons:master.

svycka commented 7 years ago

@prolic maybe I could, but not sure what to test :) can you be more specific what should I test.

prolic commented 7 years ago

Write a test that fails without this patch and succeeds with this patch.

michalbundyra commented 7 years ago

@svycka do we need still these conditions in tests:

         if (method_exists($eventManager, 'triggerEvent')) {
             $eventManager->expects($this->once())
                          ->method('triggerEvent')
                          ->with($event);
         } else {
             $eventManager->expects($this->once())
                          ->method('trigger')
                          ->with(MvcEvent::EVENT_DISPATCH_ERROR);
         }

?

prolic commented 7 years ago

@webimpress correct, this could also be updated.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.1%) to 92.943% when pulling 0d093924b47bca56164de28692630be11f47b1d9 on svycka:hotfix/issue-357 into 7344374417fe50c06ef596848c5813ed4a739ac3 on ZF-Commons:master.

svycka commented 7 years ago

@prolic anything else?

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.1%) to 92.943% when pulling a3afdac4a2dcdd4bf8eb169275499c9266d4344b on svycka:hotfix/issue-357 into 7344374417fe50c06ef596848c5813ed4a739ac3 on ZF-Commons:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.1%) to 92.943% when pulling a3afdac4a2dcdd4bf8eb169275499c9266d4344b on svycka:hotfix/issue-357 into 7344374417fe50c06ef596848c5813ed4a739ac3 on ZF-Commons:master.

prolic commented 7 years ago

Thx