Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-11-27 17:27:18 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2019-11-27 17:27:18 +0300
commit3a7cf40aaa678bea1df143d2982d603b7a334eec (patch)
tree63c1e3ad7f7f401d14411a4d44c523632906afc9 /tests/lib/InstallerTest.php
parent0568b012672d650c6b5a49e72c4028dde5463c60 (diff)
Mode to modern phpunit
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'tests/lib/InstallerTest.php')
-rw-r--r--tests/lib/InstallerTest.php56
1 files changed, 28 insertions, 28 deletions
diff --git a/tests/lib/InstallerTest.php b/tests/lib/InstallerTest.php
index 509dfdb66ab..fd21a1ae082 100644
--- a/tests/lib/InstallerTest.php
+++ b/tests/lib/InstallerTest.php
@@ -159,11 +159,11 @@ class InstallerTest extends TestCase {
$this->assertSame($updateAvailable, $installer->isUpdateAvailable('files'), 'Cached result should be returned and fetcher should be only called once');
}
- /**
- * @expectedException \Exception
- * @expectedExceptionMessage Certificate "4112" has been revoked
- */
+
public function testDownloadAppWithRevokedCertificate() {
+ $this->expectException(\Exception::class);
+ $this->expectExceptionMessage('Certificate "4112" has been revoked');
+
$appArray = [
[
'id' => 'news',
@@ -203,11 +203,11 @@ gLgK8d8sKL60JMmKHN3boHrsThKBVA==
$installer->downloadApp('news');
}
- /**
- * @expectedException \Exception
- * @expectedExceptionMessage App with id news has a certificate not issued by a trusted Code Signing Authority
- */
+
public function testDownloadAppWithNotNextcloudCertificate() {
+ $this->expectException(\Exception::class);
+ $this->expectExceptionMessage('App with id news has a certificate not issued by a trusted Code Signing Authority');
+
$appArray = [
[
'id' => 'news',
@@ -246,11 +246,11 @@ YSu356M=
$installer->downloadApp('news');
}
- /**
- * @expectedException \Exception
- * @expectedExceptionMessage App with id news has a cert issued to passman
- */
+
public function testDownloadAppWithDifferentCN() {
+ $this->expectException(\Exception::class);
+ $this->expectExceptionMessage('App with id news has a cert issued to passman');
+
$appArray = [
[
'id' => 'news',
@@ -289,11 +289,11 @@ u/spPSSVhaun5BA1FlphB2TkgnzlCmxJa63nFY045e/Jq+IKMcqqZl/092gbI2EQ
$installer->downloadApp('news');
}
- /**
- * @expectedException \Exception
- * @expectedExceptionMessage App with id passman has invalid signature
- */
+
public function testDownloadAppWithInvalidSignature() {
+ $this->expectException(\Exception::class);
+ $this->expectExceptionMessage('App with id passman has invalid signature');
+
$appArray = [
[
'id' => 'passman',
@@ -357,11 +357,11 @@ u/spPSSVhaun5BA1FlphB2TkgnzlCmxJa63nFY045e/Jq+IKMcqqZl/092gbI2EQ
$installer->downloadApp('passman');
}
- /**
- * @expectedException \Exception
- * @expectedExceptionMessage Extracted app testapp has more than 1 folder
- */
+
public function testDownloadAppWithMoreThanOneFolderDownloaded() {
+ $this->expectException(\Exception::class);
+ $this->expectExceptionMessage('Extracted app testapp has more than 1 folder');
+
$appArray = [
[
'id' => 'testapp',
@@ -441,11 +441,11 @@ YwDVP+QmNRzx72jtqAN/Kc3CvQ9nkgYhU65B95aX0xA=',
$installer->downloadApp('testapp');
}
- /**
- * @expectedException \Exception
- * @expectedExceptionMessage App for id testapp has a wrong app ID in info.xml: testapp1
- */
+
public function testDownloadAppWithMismatchingIdentifier() {
+ $this->expectException(\Exception::class);
+ $this->expectExceptionMessage('App for id testapp has a wrong app ID in info.xml: testapp1');
+
$appArray = [
[
'id' => 'testapp',
@@ -606,11 +606,11 @@ MPLX6f5V9tCJtlH6ztmEcDROfvuVc0U3rEhqx2hphoyo+MZrPFpdcJL8KkIdMKbY
$this->assertEquals('0.9', \OC_App::getAppVersionByPath(__DIR__ . '/../../apps/testapp/'));
}
- /**
- * @expectedException \Exception
- * @expectedExceptionMessage App for id testapp has version 0.9 and tried to update to lower version 0.8
- */
+
public function testDownloadAppWithDowngrade() {
+ $this->expectException(\Exception::class);
+ $this->expectExceptionMessage('App for id testapp has version 0.9 and tried to update to lower version 0.8');
+
$appArray = [
[
'id' => 'testapp',