@@ -46,7 +46,7 @@ protected function setUp(): void {
4646 }
4747
4848
49- public function testBogusData () {
49+ public function testBogusData (): void {
5050 $ this ->expectException (\Exception::class);
5151 $ this ->expectExceptionMessage ('Certificate could not get parsed. ' );
5252
@@ -60,58 +60,58 @@ public function testOpenSslTrustedCertificateFormat(): void {
6060 $ this ->assertSame ('thawte, Inc. ' , $ certificate ->getOrganization ());
6161 }
6262
63- public function testCertificateStartingWithFileReference () {
63+ public function testCertificateStartingWithFileReference (): void {
6464 $ this ->expectException (\Exception::class);
6565 $ this ->expectExceptionMessage ('Certificate could not get parsed. ' );
6666
6767 new Certificate ('file:// ' .__DIR__ . '/../../data/certificates/goodCertificate.crt ' , 'bar ' );
6868 }
6969
70- public function testGetName () {
70+ public function testGetName (): void {
7171 $ this ->assertSame ('GoodCertificate ' , $ this ->goodCertificate ->getName ());
7272 $ this ->assertSame ('BadCertificate ' , $ this ->invalidCertificate ->getName ());
7373 }
7474
75- public function testGetCommonName () {
76- $ this ->assertSame ('security.owncloud .com ' , $ this ->goodCertificate ->getCommonName ());
75+ public function testGetCommonName (): void {
76+ $ this ->assertSame ('security.nextcloud .com ' , $ this ->goodCertificate ->getCommonName ());
7777 $ this ->assertSame (null , $ this ->invalidCertificate ->getCommonName ());
7878 }
7979
80- public function testGetOrganization () {
81- $ this ->assertSame ('ownCloud Security ' , $ this ->goodCertificate ->getOrganization ());
80+ public function testGetOrganization (): void {
81+ $ this ->assertSame ('Nextcloud Security ' , $ this ->goodCertificate ->getOrganization ());
8282 $ this ->assertSame ('Internet Widgits Pty Ltd ' , $ this ->invalidCertificate ->getOrganization ());
8383 }
8484
85- public function testGetIssueDate () {
86- $ expected = new \DateTime ('2015 -08-27 20:03:42 GMT ' );
85+ public function testGetIssueDate (): void {
86+ $ expected = new \DateTime ('2025 -08-25 09:53:14 GMT ' );
8787 $ this ->assertEquals ($ expected ->getTimestamp (), $ this ->goodCertificate ->getIssueDate ()->getTimestamp ());
88- $ expected = new \DateTime ('2015 -08-27 20:19:13 GMT ' );
88+ $ expected = new \DateTime ('2025 -08-25 10:00:15 GMT ' );
8989 $ this ->assertEquals ($ expected ->getTimestamp (), $ this ->invalidCertificate ->getIssueDate ()->getTimestamp ());
9090 }
9191
92- public function testGetExpireDate () {
93- $ expected = new \DateTime ('2025 -08-24 20:03:42 GMT ' );
92+ public function testGetExpireDate (): void {
93+ $ expected = new \DateTime ('2035 -08-23 09:53:14 GMT ' );
9494 $ this ->assertEquals ($ expected ->getTimestamp (), $ this ->goodCertificate ->getExpireDate ()->getTimestamp ());
95- $ expected = new \DateTime ('2025 -08-24 20:19:13 GMT ' );
95+ $ expected = new \DateTime ('2035 -08-23 10:00:15 GMT ' );
9696 $ this ->assertEquals ($ expected ->getTimestamp (), $ this ->invalidCertificate ->getExpireDate ()->getTimestamp ());
9797 $ expected = new \DateTime ('2014-08-28 09:12:43 GMT ' );
9898 $ this ->assertEquals ($ expected ->getTimestamp (), $ this ->expiredCertificate ->getExpireDate ()->getTimestamp ());
9999 }
100100
101- public function testIsExpired () {
101+ public function testIsExpired (): void {
102102 $ this ->assertSame (false , $ this ->goodCertificate ->isExpired ());
103103 $ this ->assertSame (false , $ this ->invalidCertificate ->isExpired ());
104104 $ this ->assertSame (true , $ this ->expiredCertificate ->isExpired ());
105105 }
106106
107- public function testGetIssuerName () {
108- $ this ->assertSame ('security.owncloud .com ' , $ this ->goodCertificate ->getIssuerName ());
107+ public function testGetIssuerName (): void {
108+ $ this ->assertSame ('security.nextcloud .com ' , $ this ->goodCertificate ->getIssuerName ());
109109 $ this ->assertSame (null , $ this ->invalidCertificate ->getIssuerName ());
110110 $ this ->assertSame (null , $ this ->expiredCertificate ->getIssuerName ());
111111 }
112112
113- public function testGetIssuerOrganization () {
114- $ this ->assertSame ('ownCloud Security ' , $ this ->goodCertificate ->getIssuerOrganization ());
113+ public function testGetIssuerOrganization (): void {
114+ $ this ->assertSame ('Nextcloud Security ' , $ this ->goodCertificate ->getIssuerOrganization ());
115115 $ this ->assertSame ('Internet Widgits Pty Ltd ' , $ this ->invalidCertificate ->getIssuerOrganization ());
116116 $ this ->assertSame ('Internet Widgits Pty Ltd ' , $ this ->expiredCertificate ->getIssuerOrganization ());
117117 }
0 commit comments