aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/InstallerTest.php
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2024-09-15 22:32:31 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2024-09-15 22:32:31 +0200
commit49dd79eabb2b8902559a7a4e8f8fcad54f46b604 (patch)
tree2af18db46ba463368dc4461d7436fb69577923de /tests/lib/InstallerTest.php
parent4281ce6fa1bb8235426099d720734d2394bec203 (diff)
downloadnextcloud-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/InstallerTest.php')
-rw-r--r--tests/lib/InstallerTest.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/lib/InstallerTest.php b/tests/lib/InstallerTest.php
index 1fd48ea4fc9..d27ca6e2159 100644
--- a/tests/lib/InstallerTest.php
+++ b/tests/lib/InstallerTest.php
@@ -86,7 +86,7 @@ class InstallerTest extends TestCase {
parent::tearDown();
}
- public function testInstallApp() {
+ public function testInstallApp(): void {
// Read the current version of the app to check for bug #2572
\OCP\Server::get(IAppManager::class)->getAppVersion('testapp', true);
@@ -149,7 +149,7 @@ class InstallerTest extends TestCase {
* @param array $appArray
* @param string|bool $updateAvailable
*/
- public function testIsUpdateAvailable(array $appArray, $updateAvailable) {
+ public function testIsUpdateAvailable(array $appArray, $updateAvailable): void {
$this->appFetcher
->expects($this->once())
->method('get')
@@ -161,7 +161,7 @@ class InstallerTest extends TestCase {
}
- public function testDownloadAppWithRevokedCertificate() {
+ public function testDownloadAppWithRevokedCertificate(): void {
$this->expectException(\Exception::class);
$this->expectExceptionMessage('Certificate "4112" has been revoked');
@@ -205,7 +205,7 @@ gLgK8d8sKL60JMmKHN3boHrsThKBVA==
}
- public function testDownloadAppWithNotNextcloudCertificate() {
+ public function testDownloadAppWithNotNextcloudCertificate(): void {
$this->expectException(\Exception::class);
$this->expectExceptionMessage('App with id news has a certificate not issued by a trusted Code Signing Authority');
@@ -248,7 +248,7 @@ YSu356M=
}
- public function testDownloadAppWithDifferentCN() {
+ public function testDownloadAppWithDifferentCN(): void {
$this->expectException(\Exception::class);
$this->expectExceptionMessage('App with id news has a cert issued to passman');
@@ -291,7 +291,7 @@ u/spPSSVhaun5BA1FlphB2TkgnzlCmxJa63nFY045e/Jq+IKMcqqZl/092gbI2EQ
}
- public function testDownloadAppWithInvalidSignature() {
+ public function testDownloadAppWithInvalidSignature(): void {
$this->expectException(\Exception::class);
$this->expectExceptionMessage('App with id passman has invalid signature');
@@ -359,7 +359,7 @@ u/spPSSVhaun5BA1FlphB2TkgnzlCmxJa63nFY045e/Jq+IKMcqqZl/092gbI2EQ
}
- public function testDownloadAppWithMoreThanOneFolderDownloaded() {
+ public function testDownloadAppWithMoreThanOneFolderDownloaded(): void {
$this->expectException(\Exception::class);
$this->expectExceptionMessage('Extracted app testapp has more than 1 folder');
@@ -443,7 +443,7 @@ YwDVP+QmNRzx72jtqAN/Kc3CvQ9nkgYhU65B95aX0xA=',
}
- public function testDownloadAppWithMismatchingIdentifier() {
+ public function testDownloadAppWithMismatchingIdentifier(): void {
$this->expectException(\Exception::class);
$this->expectExceptionMessage('App for id testapp has a wrong app ID in info.xml: testapp1');
@@ -525,7 +525,7 @@ YwDVP+QmNRzx72jtqAN/Kc3CvQ9nkgYhU65B95aX0xA=',
$installer->downloadApp('testapp');
}
- public function testDownloadAppSuccessful() {
+ public function testDownloadAppSuccessful(): void {
$appArray = [
[
'id' => 'testapp',
@@ -608,7 +608,7 @@ MPLX6f5V9tCJtlH6ztmEcDROfvuVc0U3rEhqx2hphoyo+MZrPFpdcJL8KkIdMKbY
}
- public function testDownloadAppWithDowngrade() {
+ public function testDownloadAppWithDowngrade(): void {
// Use previous test to download the application in version 0.9
$this->testDownloadAppSuccessful();