diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-09-22 00:56:36 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-09-22 11:01:11 +0200 |
commit | 36ce254ffd5ace8357fd777c8af42a98df01ad29 (patch) | |
tree | 9fccdc4c8ff13c3c6b2d86797e5e3401734b021a /tests/settings | |
parent | 67231ed9a75eafe5b417e4525e3d80b1a3f8826b (diff) | |
download | nextcloud-server-36ce254ffd5ace8357fd777c8af42a98df01ad29.tar.gz nextcloud-server-36ce254ffd5ace8357fd777c8af42a98df01ad29.zip |
Move dummy backend to Tests namespace
Diffstat (limited to 'tests/settings')
-rw-r--r-- | tests/settings/controller/userscontrollertest.php | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/tests/settings/controller/userscontrollertest.php b/tests/settings/controller/userscontrollertest.php index 06065a8454e..6fab43d6a16 100644 --- a/tests/settings/controller/userscontrollertest.php +++ b/tests/settings/controller/userscontrollertest.php @@ -100,7 +100,7 @@ class UsersControllerTest extends \Test\TestCase { $admin ->expects($this->once()) ->method('getBackendClassName') - ->will($this->returnValue('OC_User_Dummy')); + ->will($this->returnValue('\Test\Util\User\Dummy')); $bar = $this->getMockBuilder('\OC\User\User') ->disableOriginalConstructor()->getMock(); $bar @@ -120,7 +120,7 @@ class UsersControllerTest extends \Test\TestCase { $bar ->expects($this->once()) ->method('getBackendClassName') - ->will($this->returnValue('OC_User_Dummy')); + ->will($this->returnValue('\Test\Util\User\Dummy')); $this->container['GroupManager'] ->expects($this->once()) @@ -175,7 +175,7 @@ class UsersControllerTest extends \Test\TestCase { 'quota' => 404, 'storageLocation' => '/home/admin', 'lastLogin' => 12000, - 'backend' => 'OC_User_Dummy', + 'backend' => '\Test\Util\User\Dummy', 'email' => 'admin@bar.com', 'isRestoreDisabled' => false, ), @@ -187,7 +187,7 @@ class UsersControllerTest extends \Test\TestCase { 'quota' => 2323, 'storageLocation' => '/home/bar', 'lastLogin' => 3999000, - 'backend' => 'OC_User_Dummy', + 'backend' => '\Test\Util\User\Dummy', 'email' => 'bar@dummy.com', 'isRestoreDisabled' => false, ), @@ -257,7 +257,7 @@ class UsersControllerTest extends \Test\TestCase { $admin ->expects($this->once()) ->method('getBackendClassName') - ->will($this->returnValue('OC_User_Dummy')); + ->will($this->returnValue('\Test\Util\User\Dummy')); $bar = $this->getMockBuilder('\OC\User\User') ->disableOriginalConstructor()->getMock(); $bar @@ -277,7 +277,7 @@ class UsersControllerTest extends \Test\TestCase { $bar ->expects($this->once()) ->method('getBackendClassName') - ->will($this->returnValue('OC_User_Dummy')); + ->will($this->returnValue('\Test\Util\User\Dummy')); $this->container['GroupManager'] ->expects($this->at(0)) @@ -343,7 +343,7 @@ class UsersControllerTest extends \Test\TestCase { 'quota' => 404, 'storageLocation' => '/home/admin', 'lastLogin' => 12000, - 'backend' => 'OC_User_Dummy', + 'backend' => '\Test\Util\User\Dummy', 'email' => 'admin@bar.com', 'isRestoreDisabled' => false, ], @@ -355,7 +355,7 @@ class UsersControllerTest extends \Test\TestCase { 'quota' => 2323, 'storageLocation' => '/home/bar', 'lastLogin' => 3999000, - 'backend' => 'OC_User_Dummy', + 'backend' => '\Test\Util\User\Dummy', 'email' => 'bar@dummy.com', 'isRestoreDisabled' => false, ], @@ -414,7 +414,7 @@ class UsersControllerTest extends \Test\TestCase { $admin ->expects($this->once()) ->method('getBackendClassName') - ->will($this->returnValue('OC_User_Dummy')); + ->will($this->returnValue('\Test\Util\User\Dummy')); $bar = $this->getMockBuilder('\OC\User\User') ->disableOriginalConstructor()->getMock(); $bar @@ -434,7 +434,7 @@ class UsersControllerTest extends \Test\TestCase { $bar ->expects($this->once()) ->method('getBackendClassName') - ->will($this->returnValue('OC_User_Dummy')); + ->will($this->returnValue('\Test\Util\User\Dummy')); $this->container['UserManager'] ->expects($this->once()) @@ -474,7 +474,7 @@ class UsersControllerTest extends \Test\TestCase { 'quota' => 404, 'storageLocation' => '/home/admin', 'lastLogin' => 12000, - 'backend' => 'OC_User_Dummy', + 'backend' => '\Test\Util\User\Dummy', 'email' => 'admin@bar.com', 'isRestoreDisabled' => false, ), @@ -486,7 +486,7 @@ class UsersControllerTest extends \Test\TestCase { 'quota' => 2323, 'storageLocation' => '/home/bar', 'lastLogin' => 3999000, - 'backend' => 'OC_User_Dummy', + 'backend' => '\Test\Util\User\Dummy', 'email' => 'bar@dummy.com', 'isRestoreDisabled' => false, ), @@ -522,16 +522,12 @@ class UsersControllerTest extends \Test\TestCase { $this->container['UserManager'] ->expects($this->once()) ->method('getBackends') - ->will($this->returnValue([new \OC_User_Dummy(), new \OC_User_Database()])); + ->will($this->returnValue([new \Test\Util\User\Dummy(), new \OC_User_Database()])); $this->container['UserManager'] ->expects($this->once()) ->method('clearBackends'); $this->container['UserManager'] ->expects($this->once()) - ->method('registerBackend') - ->with(new \OC_User_Dummy()); - $this->container['UserManager'] - ->expects($this->once()) ->method('search') ->with('') ->will($this->returnValue([$user])); @@ -552,7 +548,7 @@ class UsersControllerTest extends \Test\TestCase { ) ) ); - $response = $this->container['UsersController']->index(0, 10, '','', 'OC_User_Dummy'); + $response = $this->container['UsersController']->index(0, 10, '','', '\Test\Util\User\Dummy'); $this->assertEquals($expectedResponse, $response); } @@ -562,7 +558,7 @@ class UsersControllerTest extends \Test\TestCase { $this->container['UserManager'] ->expects($this->once()) ->method('getBackends') - ->will($this->returnValue([new \OC_User_Dummy(), new \OC_User_Database()])); + ->will($this->returnValue([new \Test\Util\User\Dummy(), new \OC_User_Database()])); $this->container['UserManager'] ->expects($this->once()) ->method('search') @@ -570,7 +566,7 @@ class UsersControllerTest extends \Test\TestCase { ->will($this->returnValue([])); $expectedResponse = new DataResponse([]); - $response = $this->container['UsersController']->index(0, 10, '','', 'OC_User_Dummy'); + $response = $this->container['UsersController']->index(0, 10, '','', '\Test\Util\User\Dummy'); $this->assertEquals($expectedResponse, $response); } |