diff options
Diffstat (limited to 'apps/user_ldap/tests/Migration')
-rw-r--r-- | apps/user_ldap/tests/Migration/AbstractUUIDFixTest.php | 9 | ||||
-rw-r--r-- | apps/user_ldap/tests/Migration/UUIDFixGroupTest.php | 4 | ||||
-rw-r--r-- | apps/user_ldap/tests/Migration/UUIDFixUserTest.php | 2 |
3 files changed, 4 insertions, 11 deletions
diff --git a/apps/user_ldap/tests/Migration/AbstractUUIDFixTest.php b/apps/user_ldap/tests/Migration/AbstractUUIDFixTest.php index ec484dfe7eb..82483a54327 100644 --- a/apps/user_ldap/tests/Migration/AbstractUUIDFixTest.php +++ b/apps/user_ldap/tests/Migration/AbstractUUIDFixTest.php @@ -74,18 +74,13 @@ abstract class AbstractUUIDFixTest extends TestCase { ->willReturn(['s01', 's03']); } - protected function mockProxy($className) { - $this->proxy = $this->createMock($className); + protected function instantiateJob($className) { + $this->job = new $className($this->mapper, $this->proxy); $this->proxy->expects($this->any()) ->method('getLDAPAccess') ->willReturn($this->access); } - protected function instantiateJob($className) { - $this->job = new $className($this->mapper, $this->ldap, $this->config, $this->helper); - $this->job->overrideProxy($this->proxy); - } - public function testRunSingleRecord() { $args = [ 'records' => [ diff --git a/apps/user_ldap/tests/Migration/UUIDFixGroupTest.php b/apps/user_ldap/tests/Migration/UUIDFixGroupTest.php index a1f04d44670..fb9d2e2331c 100644 --- a/apps/user_ldap/tests/Migration/UUIDFixGroupTest.php +++ b/apps/user_ldap/tests/Migration/UUIDFixGroupTest.php @@ -40,11 +40,9 @@ class UUIDFixGroupTest extends AbstractUUIDFixTest { $this->isUser = false; parent::setUp(); - $this->isUser = false; - $this->mapper = $this->createMock(GroupMapping::class); + $this->proxy = $this->createMock(Group_Proxy::class); - $this->mockProxy(Group_Proxy::class); $this->instantiateJob(UUIDFixGroup::class); } } diff --git a/apps/user_ldap/tests/Migration/UUIDFixUserTest.php b/apps/user_ldap/tests/Migration/UUIDFixUserTest.php index 188c7b0f91d..cf80bf36230 100644 --- a/apps/user_ldap/tests/Migration/UUIDFixUserTest.php +++ b/apps/user_ldap/tests/Migration/UUIDFixUserTest.php @@ -40,8 +40,8 @@ class UUIDFixUserTest extends AbstractUUIDFixTest { parent::setUp(); $this->mapper = $this->createMock(UserMapping::class); + $this->proxy = $this->createMock(User_Proxy::class); - $this->mockProxy(User_Proxy::class); $this->instantiateJob(UUIDFixUser::class); } } |