diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2024-09-15 22:32:31 +0200 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2024-09-15 22:32:31 +0200 |
commit | 49dd79eabb2b8902559a7a4e8f8fcad54f46b604 (patch) | |
tree | 2af18db46ba463368dc4461d7436fb69577923de /tests/lib/App | |
parent | 4281ce6fa1bb8235426099d720734d2394bec203 (diff) | |
download | nextcloud-server-49dd79eabb2b8902559a7a4e8f8fcad54f46b604.tar.gz nextcloud-server-49dd79eabb2b8902559a7a4e8f8fcad54f46b604.zip |
refactor: Add void return type to PHPUnit test methods
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests/lib/App')
-rw-r--r-- | tests/lib/App/AppManagerTest.php | 50 | ||||
-rw-r--r-- | tests/lib/App/AppStore/Bundles/BundleBase.php | 6 | ||||
-rw-r--r-- | tests/lib/App/AppStore/Bundles/BundleFetcherTest.php | 6 | ||||
-rw-r--r-- | tests/lib/App/AppStore/Fetcher/AppDiscoverFetcherTest.php | 6 | ||||
-rw-r--r-- | tests/lib/App/AppStore/Fetcher/AppFetcherTest.php | 10 | ||||
-rw-r--r-- | tests/lib/App/AppStore/Fetcher/CategoryFetcherTest.php | 4 | ||||
-rw-r--r-- | tests/lib/App/AppStore/Fetcher/FetcherBase.php | 18 | ||||
-rw-r--r-- | tests/lib/App/AppStore/Version/VersionParserTest.php | 6 | ||||
-rw-r--r-- | tests/lib/App/AppStore/Version/VersionTest.php | 4 | ||||
-rw-r--r-- | tests/lib/App/CompareVersionTest.php | 6 | ||||
-rw-r--r-- | tests/lib/App/DependencyAnalyzerTest.php | 12 | ||||
-rw-r--r-- | tests/lib/App/InfoParserTest.php | 4 | ||||
-rw-r--r-- | tests/lib/App/PlatformRepositoryTest.php | 2 |
13 files changed, 67 insertions, 67 deletions
diff --git a/tests/lib/App/AppManagerTest.php b/tests/lib/App/AppManagerTest.php index ac470c00335..5c79a75bf0d 100644 --- a/tests/lib/App/AppManagerTest.php +++ b/tests/lib/App/AppManagerTest.php @@ -142,7 +142,7 @@ class AppManagerTest extends TestCase { /** * @dataProvider dataGetAppIcon */ - public function testGetAppIcon($callback, ?bool $dark, string|null $expected) { + public function testGetAppIcon($callback, ?bool $dark, string|null $expected): void { $this->urlGenerator->expects($this->atLeastOnce()) ->method('imagePath') ->willReturnCallback($callback); @@ -229,7 +229,7 @@ class AppManagerTest extends TestCase { ]; } - public function testEnableApp() { + public function testEnableApp(): void { // making sure "files_trashbin" is disabled if ($this->manager->isEnabledForUser('files_trashbin')) { $this->manager->disableApp('files_trashbin'); @@ -239,13 +239,13 @@ class AppManagerTest extends TestCase { $this->assertEquals('yes', $this->appConfig->getValue('files_trashbin', 'enabled', 'no')); } - public function testDisableApp() { + public function testDisableApp(): void { $this->eventDispatcher->expects($this->once())->method('dispatchTyped')->with(new AppDisableEvent('files_trashbin')); $this->manager->disableApp('files_trashbin'); $this->assertEquals('no', $this->appConfig->getValue('files_trashbin', 'enabled', 'no')); } - public function testNotEnableIfNotInstalled() { + public function testNotEnableIfNotInstalled(): void { try { $this->manager->enableApp('some_random_name_which_i_hope_is_not_an_app'); $this->assertFalse(true, 'If this line is reached the expected exception is not thrown.'); @@ -259,7 +259,7 @@ class AppManagerTest extends TestCase { )); } - public function testEnableAppForGroups() { + public function testEnableAppForGroups(): void { $group1 = $this->createMock(IGroup::class); $group1->method('getGID') ->willReturn('group1'); @@ -312,7 +312,7 @@ class AppManagerTest extends TestCase { * * @param array $appInfo */ - public function testEnableAppForGroupsAllowedTypes(array $appInfo) { + public function testEnableAppForGroupsAllowedTypes(array $appInfo): void { $group1 = $this->createMock(IGroup::class); $group1->method('getGID') ->willReturn('group1'); @@ -370,7 +370,7 @@ class AppManagerTest extends TestCase { * @param string $type * */ - public function testEnableAppForGroupsForbiddenTypes($type) { + public function testEnableAppForGroupsForbiddenTypes($type): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('test can\'t be enabled for groups.'); @@ -416,17 +416,17 @@ class AppManagerTest extends TestCase { $manager->enableAppForGroups('test', $groups); } - public function testIsInstalledEnabled() { + public function testIsInstalledEnabled(): void { $this->appConfig->setValue('test', 'enabled', 'yes'); $this->assertTrue($this->manager->isInstalled('test')); } - public function testIsInstalledDisabled() { + public function testIsInstalledDisabled(): void { $this->appConfig->setValue('test', 'enabled', 'no'); $this->assertFalse($this->manager->isInstalled('test')); } - public function testIsInstalledEnabledForGroups() { + public function testIsInstalledEnabledForGroups(): void { $this->appConfig->setValue('test', 'enabled', '["foo"]'); $this->assertTrue($this->manager->isInstalled('test')); } @@ -439,23 +439,23 @@ class AppManagerTest extends TestCase { return $user; } - public function testIsEnabledForUserEnabled() { + public function testIsEnabledForUserEnabled(): void { $this->appConfig->setValue('test', 'enabled', 'yes'); $user = $this->newUser('user1'); $this->assertTrue($this->manager->isEnabledForUser('test', $user)); } - public function testIsEnabledForUserDisabled() { + public function testIsEnabledForUserDisabled(): void { $this->appConfig->setValue('test', 'enabled', 'no'); $user = $this->newUser('user1'); $this->assertFalse($this->manager->isEnabledForUser('test', $user)); } - public function testGetAppPath() { + public function testGetAppPath(): void { $this->assertEquals(\OC::$SERVERROOT . '/apps/files', $this->manager->getAppPath('files')); } - public function testGetAppPathSymlink() { + public function testGetAppPathSymlink(): void { $fakeAppDirname = sha1(uniqid('test', true)); $fakeAppPath = sys_get_temp_dir() . '/' . $fakeAppDirname; $fakeAppLink = \OC::$SERVERROOT . '/' . $fakeAppDirname; @@ -484,12 +484,12 @@ class AppManagerTest extends TestCase { $this->assertEquals($fakeAppLink . '/test-test-app', $generatedAppPath); } - public function testGetAppPathFail() { + public function testGetAppPathFail(): void { $this->expectException(AppPathNotFoundException::class); $this->manager->getAppPath('testnotexisting'); } - public function testIsEnabledForUserEnabledForGroup() { + public function testIsEnabledForUserEnabledForGroup(): void { $user = $this->newUser('user1'); $this->groupManager->expects($this->once()) ->method('getUserGroupIds') @@ -500,7 +500,7 @@ class AppManagerTest extends TestCase { $this->assertTrue($this->manager->isEnabledForUser('test', $user)); } - public function testIsEnabledForUserDisabledForGroup() { + public function testIsEnabledForUserDisabledForGroup(): void { $user = $this->newUser('user1'); $this->groupManager->expects($this->once()) ->method('getUserGroupIds') @@ -511,12 +511,12 @@ class AppManagerTest extends TestCase { $this->assertFalse($this->manager->isEnabledForUser('test', $user)); } - public function testIsEnabledForUserLoggedOut() { + public function testIsEnabledForUserLoggedOut(): void { $this->appConfig->setValue('test', 'enabled', '["foo"]'); $this->assertFalse($this->manager->isEnabledForUser('test')); } - public function testIsEnabledForUserLoggedIn() { + public function testIsEnabledForUserLoggedIn(): void { $user = $this->newUser('user1'); $this->userSession->expects($this->once()) @@ -531,7 +531,7 @@ class AppManagerTest extends TestCase { $this->assertTrue($this->manager->isEnabledForUser('test')); } - public function testGetInstalledApps() { + public function testGetInstalledApps(): void { $this->appConfig->setValue('test1', 'enabled', 'yes'); $this->appConfig->setValue('test2', 'enabled', 'no'); $this->appConfig->setValue('test3', 'enabled', '["foo"]'); @@ -554,7 +554,7 @@ class AppManagerTest extends TestCase { $this->assertEquals($apps, $this->manager->getInstalledApps()); } - public function testGetAppsForUser() { + public function testGetAppsForUser(): void { $user = $this->newUser('user1'); $this->groupManager->expects($this->any()) ->method('getUserGroupIds') @@ -584,7 +584,7 @@ class AppManagerTest extends TestCase { $this->assertEquals($enabled, $this->manager->getEnabledAppsForUser($user)); } - public function testGetAppsNeedingUpgrade() { + public function testGetAppsNeedingUpgrade(): void { /** @var AppManager|MockObject $manager */ $manager = $this->getMockBuilder(AppManager::class) ->setConstructorArgs([ @@ -642,7 +642,7 @@ class AppManagerTest extends TestCase { $this->assertEquals('test4', $apps[1]['id']); } - public function testGetIncompatibleApps() { + public function testGetIncompatibleApps(): void { /** @var AppManager|MockObject $manager */ $manager = $this->getMockBuilder(AppManager::class) ->setConstructorArgs([ @@ -694,7 +694,7 @@ class AppManagerTest extends TestCase { $this->assertEquals('test3', $apps[1]['id']); } - public function testGetEnabledAppsForGroup() { + public function testGetEnabledAppsForGroup(): void { $group = $this->createMock(IGroup::class); $group->expects($this->any()) ->method('getGID') @@ -723,7 +723,7 @@ class AppManagerTest extends TestCase { $this->assertEquals($enabled, $this->manager->getEnabledAppsForGroup($group)); } - public function testGetAppRestriction() { + public function testGetAppRestriction(): void { $this->appConfig->setValue('test1', 'enabled', 'yes'); $this->appConfig->setValue('test2', 'enabled', 'no'); $this->appConfig->setValue('test3', 'enabled', '["foo"]'); diff --git a/tests/lib/App/AppStore/Bundles/BundleBase.php b/tests/lib/App/AppStore/Bundles/BundleBase.php index 4c31c49cdb1..28fb8a7736b 100644 --- a/tests/lib/App/AppStore/Bundles/BundleBase.php +++ b/tests/lib/App/AppStore/Bundles/BundleBase.php @@ -31,15 +31,15 @@ abstract class BundleBase extends TestCase { }); } - public function testGetIdentifier() { + public function testGetIdentifier(): void { $this->assertSame($this->bundleIdentifier, $this->bundle->getIdentifier()); } - public function testGetName() { + public function testGetName(): void { $this->assertSame($this->bundleName, $this->bundle->getName()); } - public function testGetAppIdentifiers() { + public function testGetAppIdentifiers(): void { $this->assertSame($this->bundleAppIds, $this->bundle->getAppIdentifiers()); } } diff --git a/tests/lib/App/AppStore/Bundles/BundleFetcherTest.php b/tests/lib/App/AppStore/Bundles/BundleFetcherTest.php index 484b81b5197..225dd78a1b4 100644 --- a/tests/lib/App/AppStore/Bundles/BundleFetcherTest.php +++ b/tests/lib/App/AppStore/Bundles/BundleFetcherTest.php @@ -32,7 +32,7 @@ class BundleFetcherTest extends TestCase { ); } - public function testGetBundles() { + public function testGetBundles(): void { $expected = [ new EnterpriseBundle($this->l10n), new HubBundle($this->l10n), @@ -44,13 +44,13 @@ class BundleFetcherTest extends TestCase { $this->assertEquals($expected, $this->bundleFetcher->getBundles()); } - public function testGetBundleByIdentifier() { + public function testGetBundleByIdentifier(): void { $this->assertEquals(new EnterpriseBundle($this->l10n), $this->bundleFetcher->getBundleByIdentifier('EnterpriseBundle')); $this->assertEquals(new GroupwareBundle($this->l10n), $this->bundleFetcher->getBundleByIdentifier('GroupwareBundle')); } - public function testGetBundleByIdentifierWithException() { + public function testGetBundleByIdentifierWithException(): void { $this->expectException(\BadMethodCallException::class); $this->expectExceptionMessage('Bundle with specified identifier does not exist'); diff --git a/tests/lib/App/AppStore/Fetcher/AppDiscoverFetcherTest.php b/tests/lib/App/AppStore/Fetcher/AppDiscoverFetcherTest.php index 82f40043971..fdc8b45cf70 100644 --- a/tests/lib/App/AppStore/Fetcher/AppDiscoverFetcherTest.php +++ b/tests/lib/App/AppStore/Fetcher/AppDiscoverFetcherTest.php @@ -34,7 +34,7 @@ class AppDiscoverFetcherTest extends FetcherBase { ); } - public function testAppstoreDisabled() { + public function testAppstoreDisabled(): void { $this->config ->method('getSystemValueBool') ->willReturnCallback(function ($var, $default) { @@ -50,7 +50,7 @@ class AppDiscoverFetcherTest extends FetcherBase { $this->assertEquals([], $this->fetcher->get()); } - public function testNoInternet() { + public function testNoInternet(): void { $this->config ->method('getSystemValueBool') ->willReturnCallback(function ($var, $default) { @@ -74,7 +74,7 @@ class AppDiscoverFetcherTest extends FetcherBase { /** * @dataProvider dataGetETag */ - public function testGetEtag(string|null $expected, bool $throws, string $content = '') { + public function testGetEtag(string|null $expected, bool $throws, string $content = ''): void { $folder = $this->createMock(ISimpleFolder::class); if (!$throws) { $file = $this->createMock(ISimpleFile::class); diff --git a/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php b/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php index 9a04c11a1f3..61fe24be1a9 100644 --- a/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php +++ b/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php @@ -1856,7 +1856,7 @@ EJL3BaQAQaASSsvFrcozYxrQG4VzEg== ->willReturn('stable'); } - public function testGetWithFilter() { + public function testGetWithFilter(): void { $this->config->method('getSystemValueString') ->willReturnCallback(function ($key, $default) { if ($key === 'version') { @@ -1939,7 +1939,7 @@ EJL3BaQAQaASSsvFrcozYxrQG4VzEg== $this->assertEquals(self::$expectedResponse['data'], $this->fetcher->get()); } - public function testAppstoreDisabled() { + public function testAppstoreDisabled(): void { $this->config ->method('getSystemValueString') ->willReturnCallback(function ($var, $default) { @@ -1966,7 +1966,7 @@ EJL3BaQAQaASSsvFrcozYxrQG4VzEg== } - public function testNoInternet() { + public function testNoInternet(): void { $this->config ->method('getSystemValueString') ->willReturnCallback(function ($var, $default) { @@ -1994,7 +1994,7 @@ EJL3BaQAQaASSsvFrcozYxrQG4VzEg== $this->assertEquals([], $this->fetcher->get()); } - public function testSetVersion() { + public function testSetVersion(): void { $this->config->method('getSystemValueString') ->willReturnCallback(function ($key, $default) { if ($key === 'version') { @@ -2078,7 +2078,7 @@ EJL3BaQAQaASSsvFrcozYxrQG4VzEg== $this->assertEquals(self::$expectedResponse['data'], $this->fetcher->get()); } - public function testGetAppsAllowlist() { + public function testGetAppsAllowlist(): void { $this->config->method('getSystemValueString') ->willReturnCallback(function ($key, $default) { if ($key === 'version') { diff --git a/tests/lib/App/AppStore/Fetcher/CategoryFetcherTest.php b/tests/lib/App/AppStore/Fetcher/CategoryFetcherTest.php index b7dbf6eccd8..0beb68bf03a 100644 --- a/tests/lib/App/AppStore/Fetcher/CategoryFetcherTest.php +++ b/tests/lib/App/AppStore/Fetcher/CategoryFetcherTest.php @@ -24,7 +24,7 @@ class CategoryFetcherTest extends FetcherBase { ); } - public function testAppstoreDisabled() { + public function testAppstoreDisabled(): void { $this->config ->method('getSystemValueBool') ->willReturnCallback(function ($var, $default) { @@ -40,7 +40,7 @@ class CategoryFetcherTest extends FetcherBase { $this->assertEquals([], $this->fetcher->get()); } - public function testNoInternet() { + public function testNoInternet(): void { $this->config ->method('getSystemValueBool') ->willReturnCallback(function ($var, $default) { diff --git a/tests/lib/App/AppStore/Fetcher/FetcherBase.php b/tests/lib/App/AppStore/Fetcher/FetcherBase.php index f2bc981d4a6..95129b3114d 100644 --- a/tests/lib/App/AppStore/Fetcher/FetcherBase.php +++ b/tests/lib/App/AppStore/Fetcher/FetcherBase.php @@ -59,7 +59,7 @@ abstract class FetcherBase extends TestCase { $this->registry = $this->createMock(IRegistry::class); } - public function testGetWithAlreadyExistingFileAndUpToDateTimestampAndVersion() { + public function testGetWithAlreadyExistingFileAndUpToDateTimestampAndVersion(): void { $this->config ->method('getSystemValueString') ->willReturnCallback(function ($var, $default) { @@ -100,7 +100,7 @@ abstract class FetcherBase extends TestCase { $this->assertSame($expected, $this->fetcher->get()); } - public function testGetWithNotExistingFileAndUpToDateTimestampAndVersion() { + public function testGetWithNotExistingFileAndUpToDateTimestampAndVersion(): void { $this->config ->method('getSystemValueString') ->willReturnCallback(function ($var, $default) { @@ -175,7 +175,7 @@ abstract class FetcherBase extends TestCase { $this->assertSame($expected, $this->fetcher->get()); } - public function testGetWithAlreadyExistingFileAndOutdatedTimestamp() { + public function testGetWithAlreadyExistingFileAndOutdatedTimestamp(): void { $this->config->method('getSystemValueString') ->willReturnCallback(function ($key, $default) { if ($key === 'version') { @@ -249,7 +249,7 @@ abstract class FetcherBase extends TestCase { $this->assertSame($expected, $this->fetcher->get()); } - public function testGetWithAlreadyExistingFileAndNoVersion() { + public function testGetWithAlreadyExistingFileAndNoVersion(): void { $this->config ->method('getSystemValueString') ->willReturnCallback(function ($var, $default) { @@ -322,7 +322,7 @@ abstract class FetcherBase extends TestCase { $this->assertSame($expected, $this->fetcher->get()); } - public function testGetWithAlreadyExistingFileAndOutdatedVersion() { + public function testGetWithAlreadyExistingFileAndOutdatedVersion(): void { $this->config ->method('getSystemValueString') ->willReturnCallback(function ($var, $default) { @@ -394,7 +394,7 @@ abstract class FetcherBase extends TestCase { $this->assertSame($expected, $this->fetcher->get()); } - public function testGetWithExceptionInClient() { + public function testGetWithExceptionInClient(): void { $this->config->method('getSystemValueString') ->willReturnArgument(1); $this->config->method('getSystemValueBool') @@ -430,7 +430,7 @@ abstract class FetcherBase extends TestCase { $this->assertSame([], $this->fetcher->get()); } - public function testGetMatchingETag() { + public function testGetMatchingETag(): void { $this->config->method('getSystemValueString') ->willReturnCallback(function ($key, $default) { if ($key === 'version') { @@ -509,7 +509,7 @@ abstract class FetcherBase extends TestCase { $this->assertSame($expected, $this->fetcher->get()); } - public function testGetNoMatchingETag() { + public function testGetNoMatchingETag(): void { $this->config->method('getSystemValueString') ->willReturnCallback(function ($key, $default) { if ($key === 'version') { @@ -594,7 +594,7 @@ abstract class FetcherBase extends TestCase { } - public function testFetchAfterUpgradeNoETag() { + public function testFetchAfterUpgradeNoETag(): void { $this->config->method('getSystemValueString') ->willReturnCallback(function ($key, $default) { if ($key === 'version') { diff --git a/tests/lib/App/AppStore/Version/VersionParserTest.php b/tests/lib/App/AppStore/Version/VersionParserTest.php index c461bf7c6cf..5bd9ee16b39 100644 --- a/tests/lib/App/AppStore/Version/VersionParserTest.php +++ b/tests/lib/App/AppStore/Version/VersionParserTest.php @@ -62,12 +62,12 @@ class VersionParserTest extends TestCase { * @param Version $expected */ public function testGetVersion($input, - Version $expected) { + Version $expected): void { $this->assertEquals($expected, $this->versionParser->getVersion($input)); } - public function testGetVersionException() { + public function testGetVersionException(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('Version cannot be parsed: BogusVersion'); @@ -75,7 +75,7 @@ class VersionParserTest extends TestCase { } - public function testGetVersionExceptionWithMultiple() { + public function testGetVersionExceptionWithMultiple(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('Version cannot be parsed: >=8.2 <=9.1a'); diff --git a/tests/lib/App/AppStore/Version/VersionTest.php b/tests/lib/App/AppStore/Version/VersionTest.php index 68da79fdc8d..7fece37cf5f 100644 --- a/tests/lib/App/AppStore/Version/VersionTest.php +++ b/tests/lib/App/AppStore/Version/VersionTest.php @@ -10,12 +10,12 @@ use OC\App\AppStore\Version\Version; use Test\TestCase; class VersionTest extends TestCase { - public function testGetMinimumVersion() { + public function testGetMinimumVersion(): void { $version = new Version('9', '10'); $this->assertSame('9', $version->getMinimumVersion()); } - public function testGetMaximumVersion() { + public function testGetMaximumVersion(): void { $version = new Version('9', '10'); $this->assertSame('10', $version->getMaximumVersion()); } diff --git a/tests/lib/App/CompareVersionTest.php b/tests/lib/App/CompareVersionTest.php index b9af3a96b22..0d020428fed 100644 --- a/tests/lib/App/CompareVersionTest.php +++ b/tests/lib/App/CompareVersionTest.php @@ -58,21 +58,21 @@ class CompareVersionTest extends TestCase { * @dataProvider comparisonData */ public function testComparison(string $actualVersion, string $requiredVersion, - string $comparator, bool $expected) { + string $comparator, bool $expected): void { $isCompatible = $this->compare->isCompatible($actualVersion, $requiredVersion, $comparator); $this->assertEquals($expected, $isCompatible); } - public function testInvalidServerVersion() { + public function testInvalidServerVersion(): void { $actualVersion = '13'; $this->expectException(InvalidArgumentException::class); $this->compare->isCompatible($actualVersion, '13.0.0'); } - public function testInvalidRequiredVersion() { + public function testInvalidRequiredVersion(): void { $actualVersion = '13.0.0'; $this->expectException(InvalidArgumentException::class); diff --git a/tests/lib/App/DependencyAnalyzerTest.php b/tests/lib/App/DependencyAnalyzerTest.php index 7572fd67c8c..31eeb77d7e5 100644 --- a/tests/lib/App/DependencyAnalyzerTest.php +++ b/tests/lib/App/DependencyAnalyzerTest.php @@ -74,7 +74,7 @@ class DependencyAnalyzerTest extends TestCase { * @param string $maxVersion * @param string $intSize */ - public function testPhpVersion($expectedMissing, $minVersion, $maxVersion, $intSize) { + public function testPhpVersion($expectedMissing, $minVersion, $maxVersion, $intSize): void { $app = [ 'dependencies' => [ 'php' => [] @@ -100,7 +100,7 @@ class DependencyAnalyzerTest extends TestCase { * @param $expectedMissing * @param $databases */ - public function testDatabases($expectedMissing, $databases) { + public function testDatabases($expectedMissing, $databases): void { $app = [ 'dependencies' => [ ] @@ -120,7 +120,7 @@ class DependencyAnalyzerTest extends TestCase { * @param string $expectedMissing * @param string|null $commands */ - public function testCommand($expectedMissing, $commands) { + public function testCommand($expectedMissing, $commands): void { $app = [ 'dependencies' => [ ] @@ -139,7 +139,7 @@ class DependencyAnalyzerTest extends TestCase { * @param $expectedMissing * @param $libs */ - public function testLibs($expectedMissing, $libs) { + public function testLibs($expectedMissing, $libs): void { $app = [ 'dependencies' => [ ] @@ -159,7 +159,7 @@ class DependencyAnalyzerTest extends TestCase { * @param $expectedMissing * @param $oss */ - public function testOS($expectedMissing, $oss) { + public function testOS($expectedMissing, $oss): void { $app = [ 'dependencies' => [] ]; @@ -178,7 +178,7 @@ class DependencyAnalyzerTest extends TestCase { * @param $expectedMissing * @param $oc */ - public function testOC($expectedMissing, $oc) { + public function testOC($expectedMissing, $oc): void { $app = [ 'dependencies' => [] ]; diff --git a/tests/lib/App/InfoParserTest.php b/tests/lib/App/InfoParserTest.php index 9affe3ff9ae..914741d05b1 100644 --- a/tests/lib/App/InfoParserTest.php +++ b/tests/lib/App/InfoParserTest.php @@ -34,14 +34,14 @@ class InfoParserTest extends TestCase { /** * @dataProvider providesInfoXml */ - public function testParsingValidXmlWithoutCache($expectedJson, $xmlFile) { + public function testParsingValidXmlWithoutCache($expectedJson, $xmlFile): void { $this->parserTest($expectedJson, $xmlFile); } /** * @dataProvider providesInfoXml */ - public function testParsingValidXmlWithCache($expectedJson, $xmlFile) { + public function testParsingValidXmlWithCache($expectedJson, $xmlFile): void { $this->parserTest($expectedJson, $xmlFile, self::$cache); } diff --git a/tests/lib/App/PlatformRepositoryTest.php b/tests/lib/App/PlatformRepositoryTest.php index e1eb7b16b40..921d24159c9 100644 --- a/tests/lib/App/PlatformRepositoryTest.php +++ b/tests/lib/App/PlatformRepositoryTest.php @@ -14,7 +14,7 @@ class PlatformRepositoryTest extends \Test\TestCase { * @param $expected * @param $input */ - public function testVersion($input, $expected) { + public function testVersion($input, $expected): void { $pr = new OC\App\PlatformRepository(); $normalizedVersion = $pr->normalizeVersion($input); $this->assertEquals($expected, $normalizedVersion); |