summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-10-10 16:12:18 +0200
committerMorris Jobke <hey@morrisjobke.de>2017-04-29 00:59:09 -0300
commita8457df064eb14d2d67b2efcfee3638f18ff1683 (patch)
tree76fb93c60778cc8f3eab26a895435ae9b42340fb /tests
parent74e50910134610a108e18a3807a791ef0b677468 (diff)
downloadnextcloud-server-a8457df064eb14d2d67b2efcfee3638f18ff1683.tar.gz
nextcloud-server-a8457df064eb14d2d67b2efcfee3638f18ff1683.zip
fix unit tests
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'tests')
-rw-r--r--tests/Settings/Controller/UsersControllerTest.php37
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);
}
}