diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2019-11-21 16:40:38 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-11-27 13:34:41 +0100 |
commit | c007ca624f4a95e1a491221d425fcb2fa6e5589a (patch) | |
tree | b60aa133b438eb116ac3579283aa8a7967efd12b /apps/user_ldap/tests | |
parent | e0f32814e33f9ebb8c42744611048cbfac1eb588 (diff) | |
download | nextcloud-server-c007ca624f4a95e1a491221d425fcb2fa6e5589a.tar.gz nextcloud-server-c007ca624f4a95e1a491221d425fcb2fa6e5589a.zip |
Make phpunit8 compatible
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/user_ldap/tests')
20 files changed, 22 insertions, 22 deletions
diff --git a/apps/user_ldap/tests/AccessTest.php b/apps/user_ldap/tests/AccessTest.php index a51a396cfff..0d327ce2e06 100644 --- a/apps/user_ldap/tests/AccessTest.php +++ b/apps/user_ldap/tests/AccessTest.php @@ -78,7 +78,7 @@ class AccessTest extends TestCase { /** @var Access */ private $access; - public function setUp() { + public function setUp(): void { $this->connection = $this->createMock(Connection::class); $this->ldap = $this->createMock(LDAP::class); $this->userManager = $this->createMock(Manager::class); diff --git a/apps/user_ldap/tests/ConfigurationTest.php b/apps/user_ldap/tests/ConfigurationTest.php index 6e45f163867..5820fff25ed 100644 --- a/apps/user_ldap/tests/ConfigurationTest.php +++ b/apps/user_ldap/tests/ConfigurationTest.php @@ -29,7 +29,7 @@ class ConfigurationTest extends \Test\TestCase { /** @var Configuration */ protected $configuration; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->configuration = new Configuration('t01', false); } diff --git a/apps/user_ldap/tests/ConnectionTest.php b/apps/user_ldap/tests/ConnectionTest.php index 7a5da72fcdb..f08b5d9bf1d 100644 --- a/apps/user_ldap/tests/ConnectionTest.php +++ b/apps/user_ldap/tests/ConnectionTest.php @@ -44,7 +44,7 @@ class ConnectionTest extends \Test\TestCase { /** @var Connection */ protected $connection; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->ldap = $this->createMock(ILDAPWrapper::class); diff --git a/apps/user_ldap/tests/HelperTest.php b/apps/user_ldap/tests/HelperTest.php index 54d7d8868ce..3804938199d 100644 --- a/apps/user_ldap/tests/HelperTest.php +++ b/apps/user_ldap/tests/HelperTest.php @@ -36,7 +36,7 @@ class HelperTest extends \Test\TestCase { /** @var Helper */ private $helper; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); diff --git a/apps/user_ldap/tests/Integration/ExceptionOnLostConnection.php b/apps/user_ldap/tests/Integration/ExceptionOnLostConnection.php index 38f575db75b..493aa49c467 100644 --- a/apps/user_ldap/tests/Integration/ExceptionOnLostConnection.php +++ b/apps/user_ldap/tests/Integration/ExceptionOnLostConnection.php @@ -94,7 +94,7 @@ class ExceptionOnLostConnection { * * @throws \Exception */ - public function setUp() { + public function setUp(): void { require_once __DIR__ . '/../../../../lib/base.php'; \OC_App::loadApps(['user_ldap']); diff --git a/apps/user_ldap/tests/Jobs/SyncTest.php b/apps/user_ldap/tests/Jobs/SyncTest.php index 75ffd0e8280..d16ce6672df 100644 --- a/apps/user_ldap/tests/Jobs/SyncTest.php +++ b/apps/user_ldap/tests/Jobs/SyncTest.php @@ -69,7 +69,7 @@ class SyncTest extends TestCase { /** @var AccessFactory|\PHPUnit_Framework_MockObject_MockObject */ protected $accessFactory; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->helper = $this->createMock(Helper::class); diff --git a/apps/user_ldap/tests/LDAPProviderTest.php b/apps/user_ldap/tests/LDAPProviderTest.php index deaa368806c..cbce73be295 100644 --- a/apps/user_ldap/tests/LDAPProviderTest.php +++ b/apps/user_ldap/tests/LDAPProviderTest.php @@ -43,7 +43,7 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface; */ class LDAPProviderTest extends \Test\TestCase { - protected function setUp() { + protected function setUp(): void { parent::setUp(); } diff --git a/apps/user_ldap/tests/LDAPTest.php b/apps/user_ldap/tests/LDAPTest.php index 3e754dbd272..a6c097c6f85 100644 --- a/apps/user_ldap/tests/LDAPTest.php +++ b/apps/user_ldap/tests/LDAPTest.php @@ -30,7 +30,7 @@ class LDAPTest extends TestCase { /** @var LDAP|\PHPUnit_Framework_MockObject_MockObject */ private $ldap; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->ldap = $this->getMockBuilder(LDAP::class) ->setMethods(['invokeLDAPMethod']) diff --git a/apps/user_ldap/tests/Migration/AbstractUUIDFixTest.php b/apps/user_ldap/tests/Migration/AbstractUUIDFixTest.php index 37502027df7..323a3464ce8 100644 --- a/apps/user_ldap/tests/Migration/AbstractUUIDFixTest.php +++ b/apps/user_ldap/tests/Migration/AbstractUUIDFixTest.php @@ -58,7 +58,7 @@ abstract class AbstractUUIDFixTest extends TestCase { /** @var bool */ protected $isUser = true; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->ldap = $this->createMock(LDAP::class); diff --git a/apps/user_ldap/tests/Migration/UUIDFixGroupTest.php b/apps/user_ldap/tests/Migration/UUIDFixGroupTest.php index a85c4a4dc5e..c0bbd8098b1 100644 --- a/apps/user_ldap/tests/Migration/UUIDFixGroupTest.php +++ b/apps/user_ldap/tests/Migration/UUIDFixGroupTest.php @@ -35,7 +35,7 @@ use OCA\User_LDAP\Tests\Migration\AbstractUUIDFixTest; * @group DB */ class UUIDFixGroupTest extends AbstractUUIDFixTest { - public function setUp() { + public function setUp(): void { $this->isUser = false; parent::setUp(); diff --git a/apps/user_ldap/tests/Migration/UUIDFixInsertTest.php b/apps/user_ldap/tests/Migration/UUIDFixInsertTest.php index 0536d0b10af..32f601f2b11 100644 --- a/apps/user_ldap/tests/Migration/UUIDFixInsertTest.php +++ b/apps/user_ldap/tests/Migration/UUIDFixInsertTest.php @@ -47,7 +47,7 @@ class UUIDFixInsertTest extends TestCase { /** @var UUIDFixInsert */ protected $job; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->jobList = $this->createMock(IJobList::class); diff --git a/apps/user_ldap/tests/Migration/UUIDFixUserTest.php b/apps/user_ldap/tests/Migration/UUIDFixUserTest.php index 193e460c3c7..8e91a00156b 100644 --- a/apps/user_ldap/tests/Migration/UUIDFixUserTest.php +++ b/apps/user_ldap/tests/Migration/UUIDFixUserTest.php @@ -34,7 +34,7 @@ use OCA\User_LDAP\User_Proxy; * @group DB */ class UUIDFixUserTest extends AbstractUUIDFixTest { - public function setUp() { + public function setUp(): void { $this->isUser = true; parent::setUp(); diff --git a/apps/user_ldap/tests/Settings/AdminTest.php b/apps/user_ldap/tests/Settings/AdminTest.php index 84004b9d465..d421c379bf5 100644 --- a/apps/user_ldap/tests/Settings/AdminTest.php +++ b/apps/user_ldap/tests/Settings/AdminTest.php @@ -43,7 +43,7 @@ class AdminTest extends TestCase { /** @var IL10N */ private $l10n; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->l10n = $this->getMockBuilder(IL10N::class)->getMock(); diff --git a/apps/user_ldap/tests/Settings/SectionTest.php b/apps/user_ldap/tests/Settings/SectionTest.php index 65dff000af3..0bd7a8010b6 100644 --- a/apps/user_ldap/tests/Settings/SectionTest.php +++ b/apps/user_ldap/tests/Settings/SectionTest.php @@ -37,7 +37,7 @@ class SectionTest extends TestCase { /** @var Section */ private $section; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->url = $this->createMock(IURLGenerator::class); $this->l = $this->createMock(IL10N::class); diff --git a/apps/user_ldap/tests/User/DeletedUsersIndexTest.php b/apps/user_ldap/tests/User/DeletedUsersIndexTest.php index 916b5119ce0..e81a81f742f 100644 --- a/apps/user_ldap/tests/User/DeletedUsersIndexTest.php +++ b/apps/user_ldap/tests/User/DeletedUsersIndexTest.php @@ -48,7 +48,7 @@ class DeletedUsersIndexTest extends \Test\TestCase { /** @var UserMapping|\PHPUnit_Framework_MockObject_MockObject */ protected $mapping; - public function setUp() { + public function setUp(): void { parent::setUp(); // no mocks for those as tests go against DB @@ -63,9 +63,9 @@ class DeletedUsersIndexTest extends \Test\TestCase { $this->dui = new DeletedUsersIndex($this->config, $this->db, $this->mapping); } - public function tearDown() { + public function tearDown(): void { $this->config->deleteAppFromAllUsers('user_ldap'); - return parent::tearDown(); + parent::tearDown(); } public function testMarkAndFetchUser() { diff --git a/apps/user_ldap/tests/User/ManagerTest.php b/apps/user_ldap/tests/User/ManagerTest.php index 1fb548f59bf..a8abd1e4667 100644 --- a/apps/user_ldap/tests/User/ManagerTest.php +++ b/apps/user_ldap/tests/User/ManagerTest.php @@ -86,7 +86,7 @@ class ManagerTest extends \Test\TestCase { /** @var Manager */ protected $manager; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->access = $this->createMock(Access::class); diff --git a/apps/user_ldap/tests/User/UserTest.php b/apps/user_ldap/tests/User/UserTest.php index c4563bf1f31..992d3ce990c 100644 --- a/apps/user_ldap/tests/User/UserTest.php +++ b/apps/user_ldap/tests/User/UserTest.php @@ -76,7 +76,7 @@ class UserTest extends \Test\TestCase { /** @var User */ protected $user; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->connection = $this->createMock(Connection::class); diff --git a/apps/user_ldap/tests/User_LDAPTest.php b/apps/user_ldap/tests/User_LDAPTest.php index 6671742c428..e8076a051a1 100644 --- a/apps/user_ldap/tests/User_LDAPTest.php +++ b/apps/user_ldap/tests/User_LDAPTest.php @@ -76,7 +76,7 @@ class User_LDAPTest extends TestCase { /** @var Manager|\PHPUnit_Framework_MockObject_MockObject */ protected $userManager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); \OC_User::clearBackends(); diff --git a/apps/user_ldap/tests/User_ProxyTest.php b/apps/user_ldap/tests/User_ProxyTest.php index 126391401e5..02a1815804c 100644 --- a/apps/user_ldap/tests/User_ProxyTest.php +++ b/apps/user_ldap/tests/User_ProxyTest.php @@ -49,7 +49,7 @@ class User_ProxyTest extends TestCase { /** @var UserPluginManager|\PHPUnit_Framework_MockObject_MockObject */ private $userPluginManager; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->ldapWrapper = $this->createMock(ILDAPWrapper::class); diff --git a/apps/user_ldap/tests/WizardTest.php b/apps/user_ldap/tests/WizardTest.php index 1cae2f58e5f..05b0c5a9449 100644 --- a/apps/user_ldap/tests/WizardTest.php +++ b/apps/user_ldap/tests/WizardTest.php @@ -42,7 +42,7 @@ use Test\TestCase; * @package OCA\User_LDAP\Tests */ class WizardTest extends TestCase { - protected function setUp() { + protected function setUp(): void { parent::setUp(); //we need to make sure the consts are defined, otherwise tests will fail //on systems without php5_ldap |