File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -218,10 +218,10 @@ public function delete() {
218218 $ notification = \OC ::$ server ->getNotificationManager ()->createNotification ();
219219 $ notification ->setUser ($ this ->uid );
220220 \OC ::$ server ->getNotificationManager ()->markProcessed ($ notification );
221- }
222221
223- if ($ this ->emitter ) {
224- $ this ->emitter ->emit ('\OC\User ' , 'postDelete ' , array ($ this ));
222+ if ($ this ->emitter ) {
223+ $ this ->emitter ->emit ('\OC\User ' , 'postDelete ' , array ($ this ));
224+ }
225225 }
226226 return !($ result === false );
227227 }
Original file line number Diff line number Diff line change @@ -435,16 +435,17 @@ public function testSetPasswordHooks() {
435435
436436 public function dataDeleteHooks () {
437437 return [
438- [true ],
439- [false ],
438+ [true , 2 ],
439+ [false , 1 ],
440440 ];
441441 }
442442
443443 /**
444444 * @dataProvider dataDeleteHooks
445445 * @param bool $result
446+ * @param int $expectedHooks
446447 */
447- public function testDeleteHooks ($ result ) {
448+ public function testDeleteHooks ($ result, $ expectedHooks ) {
448449 $ hooksCalled = 0 ;
449450 $ test = $ this ;
450451
@@ -521,7 +522,7 @@ public function testDeleteHooks($result) {
521522 $ this ->restoreService ('CommentsManager ' );
522523 $ this ->restoreService ('NotificationManager ' );
523524
524- $ this ->assertEquals (2 , $ hooksCalled );
525+ $ this ->assertEquals ($ expectedHooks , $ hooksCalled );
525526 }
526527
527528 public function testGetCloudId () {
You can’t perform that action at this time.
0 commit comments