|
|
@@ -435,16 +435,17 @@ class UserTest extends \Test\TestCase { |
|
|
|
|
|
|
|
public function dataDeleteHooks() { |
|
|
|
return [ |
|
|
|
[true], |
|
|
|
[false], |
|
|
|
[true, 2], |
|
|
|
[false, 1], |
|
|
|
]; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @dataProvider dataDeleteHooks |
|
|
|
* @param bool $result |
|
|
|
* @param int $expectedHooks |
|
|
|
*/ |
|
|
|
public function testDeleteHooks($result) { |
|
|
|
public function testDeleteHooks($result, $expectedHooks) { |
|
|
|
$hooksCalled = 0; |
|
|
|
$test = $this; |
|
|
|
|
|
|
@@ -521,7 +522,7 @@ class UserTest extends \Test\TestCase { |
|
|
|
$this->restoreService('CommentsManager'); |
|
|
|
$this->restoreService('NotificationManager'); |
|
|
|
|
|
|
|
$this->assertEquals(2, $hooksCalled); |
|
|
|
$this->assertEquals($expectedHooks, $hooksCalled); |
|
|
|
} |
|
|
|
|
|
|
|
public function testGetCloudId() { |