diff options
Diffstat (limited to 'tests/Settings')
-rw-r--r-- | tests/Settings/Controller/UsersControllerTest.php | 37 |
1 files changed, 13 insertions, 24 deletions
diff --git a/tests/Settings/Controller/UsersControllerTest.php b/tests/Settings/Controller/UsersControllerTest.php index 378c98e7335..5cae52ece70 100644 --- a/tests/Settings/Controller/UsersControllerTest.php +++ b/tests/Settings/Controller/UsersControllerTest.php @@ -2460,8 +2460,7 @@ class UsersControllerTest extends \Test\TestCase { ], Http::STATUS_FORBIDDEN ); - $controller = $this->getController(true); - $response = $controller->disable('abc'); + $response = $this->getController(true)->disable('abc'); $this->assertEquals($expectedResponse, $response); } @@ -2503,8 +2502,7 @@ class UsersControllerTest extends \Test\TestCase { ], Http::STATUS_FORBIDDEN ); - $controller = $this->getController(false); - $response = $controller->disable('abc'); + $response = $this->getController(false)->disable('abc'); $this->assertEquals($expectedResponse, $response); } @@ -2536,8 +2534,7 @@ class UsersControllerTest extends \Test\TestCase { ], ] ); - $controller = $this->getController(true); - $response = $controller->disable('abc'); + $response = $this->getController(true)->disable('abc'); $this->assertEquals($expectedResponse, $response); } @@ -2574,8 +2571,7 @@ class UsersControllerTest extends \Test\TestCase { ], ] ); - $controller = $this->getController(false); - $response = $controller->disable('abc'); + $response = $this->getController(false)->disable('abc'); $this->assertEquals($expectedResponse, $response); } @@ -2613,8 +2609,7 @@ class UsersControllerTest extends \Test\TestCase { ], ] ); - $controller = $this->getController(true); - $response = $controller->disable('abc'); + $response = $this->getController(true)->disable('abc'); $this->assertEquals($expectedResponse, $response); } @@ -2656,8 +2651,7 @@ class UsersControllerTest extends \Test\TestCase { ], ] ); - $controller = $this->getController(false); - $response = $controller->disable('abc'); + $response = $this->getController(false)->disable('abc'); $this->assertEquals($expectedResponse, $response); } @@ -2680,8 +2674,7 @@ class UsersControllerTest extends \Test\TestCase { ], Http::STATUS_FORBIDDEN ); - $controller = $this->getController(true); - $response = $controller->enable('abc'); + $response = $this->getController(true)->enable('abc'); $this->assertEquals($expectedResponse, $response); } @@ -2723,8 +2716,7 @@ class UsersControllerTest extends \Test\TestCase { ], Http::STATUS_FORBIDDEN ); - $controller = $this->getController(false); - $response = $controller->enable('abc'); + $response = $this->getController(false)->enable('abc'); $this->assertEquals($expectedResponse, $response); } @@ -2756,8 +2748,7 @@ class UsersControllerTest extends \Test\TestCase { ], ] ); - $controller = $this->getController(true); - $response = $controller->enable('abc'); + $response = $this->getController(true)->enable('abc'); $this->assertEquals($expectedResponse, $response); } @@ -2794,8 +2785,7 @@ class UsersControllerTest extends \Test\TestCase { ], ] ); - $controller = $this->getController(false); - $response = $controller->enable('abc'); + $response = $this->getController(false)->enable('abc'); $this->assertEquals($expectedResponse, $response); } @@ -2832,8 +2822,7 @@ class UsersControllerTest extends \Test\TestCase { ], ] ); - $controller = $this->getController(true); - $response = $controller->enable('abc'); + $response = $this->getController(true)->enable('abc'); $this->assertEquals($expectedResponse, $response); } @@ -2863,6 +2852,7 @@ class UsersControllerTest extends \Test\TestCase { ->method('isUserAccessible') ->will($this->returnValue(true)); $this->groupManager + ->expects($this->once()) ->method('getSubAdmin') ->willReturn($subadmin); @@ -2875,8 +2865,7 @@ class UsersControllerTest extends \Test\TestCase { ], ] ); - $controller = $this->getController(false); - $response = $controller->enable('abc'); + $response = $this->getController(false)->enable('abc'); $this->assertEquals($expectedResponse, $response); } } |