@@ -32,7 +32,7 @@ protected function setUp(): void {
3232 }
3333
3434
35- public function testBogusData () {
35+ public function testBogusData (): void {
3636 $ this ->expectException (\Exception::class);
3737 $ this ->expectExceptionMessage ('Certificate could not get parsed. ' );
3838
@@ -46,58 +46,58 @@ public function testOpenSslTrustedCertificateFormat(): void {
4646 $ this ->assertSame ('thawte, Inc. ' , $ certificate ->getOrganization ());
4747 }
4848
49- public function testCertificateStartingWithFileReference () {
49+ public function testCertificateStartingWithFileReference (): void {
5050 $ this ->expectException (\Exception::class);
5151 $ this ->expectExceptionMessage ('Certificate could not get parsed. ' );
5252
5353 new Certificate ('file:// ' .__DIR__ . '/../../data/certificates/goodCertificate.crt ' , 'bar ' );
5454 }
5555
56- public function testGetName () {
56+ public function testGetName (): void {
5757 $ this ->assertSame ('GoodCertificate ' , $ this ->goodCertificate ->getName ());
5858 $ this ->assertSame ('BadCertificate ' , $ this ->invalidCertificate ->getName ());
5959 }
6060
61- public function testGetCommonName () {
62- $ this ->assertSame ('security.owncloud .com ' , $ this ->goodCertificate ->getCommonName ());
61+ public function testGetCommonName (): void {
62+ $ this ->assertSame ('security.nextcloud .com ' , $ this ->goodCertificate ->getCommonName ());
6363 $ this ->assertSame (null , $ this ->invalidCertificate ->getCommonName ());
6464 }
6565
66- public function testGetOrganization () {
67- $ this ->assertSame ('ownCloud Security ' , $ this ->goodCertificate ->getOrganization ());
66+ public function testGetOrganization (): void {
67+ $ this ->assertSame ('Nextcloud Security ' , $ this ->goodCertificate ->getOrganization ());
6868 $ this ->assertSame ('Internet Widgits Pty Ltd ' , $ this ->invalidCertificate ->getOrganization ());
6969 }
7070
71- public function testGetIssueDate () {
72- $ expected = new \DateTime ('2015 -08-27 20:03:42 GMT ' );
71+ public function testGetIssueDate (): void {
72+ $ expected = new \DateTime ('2025 -08-25 09:53:14 GMT ' );
7373 $ this ->assertEquals ($ expected ->getTimestamp (), $ this ->goodCertificate ->getIssueDate ()->getTimestamp ());
74- $ expected = new \DateTime ('2015 -08-27 20:19:13 GMT ' );
74+ $ expected = new \DateTime ('2025 -08-25 10:00:15 GMT ' );
7575 $ this ->assertEquals ($ expected ->getTimestamp (), $ this ->invalidCertificate ->getIssueDate ()->getTimestamp ());
7676 }
7777
78- public function testGetExpireDate () {
79- $ expected = new \DateTime ('2025 -08-24 20:03:42 GMT ' );
78+ public function testGetExpireDate (): void {
79+ $ expected = new \DateTime ('2035 -08-23 09:53:14 GMT ' );
8080 $ this ->assertEquals ($ expected ->getTimestamp (), $ this ->goodCertificate ->getExpireDate ()->getTimestamp ());
81- $ expected = new \DateTime ('2025 -08-24 20:19:13 GMT ' );
81+ $ expected = new \DateTime ('2035 -08-23 10:00:15 GMT ' );
8282 $ this ->assertEquals ($ expected ->getTimestamp (), $ this ->invalidCertificate ->getExpireDate ()->getTimestamp ());
8383 $ expected = new \DateTime ('2014-08-28 09:12:43 GMT ' );
8484 $ this ->assertEquals ($ expected ->getTimestamp (), $ this ->expiredCertificate ->getExpireDate ()->getTimestamp ());
8585 }
8686
87- public function testIsExpired () {
87+ public function testIsExpired (): void {
8888 $ this ->assertSame (false , $ this ->goodCertificate ->isExpired ());
8989 $ this ->assertSame (false , $ this ->invalidCertificate ->isExpired ());
9090 $ this ->assertSame (true , $ this ->expiredCertificate ->isExpired ());
9191 }
9292
93- public function testGetIssuerName () {
94- $ this ->assertSame ('security.owncloud .com ' , $ this ->goodCertificate ->getIssuerName ());
93+ public function testGetIssuerName (): void {
94+ $ this ->assertSame ('security.nextcloud .com ' , $ this ->goodCertificate ->getIssuerName ());
9595 $ this ->assertSame (null , $ this ->invalidCertificate ->getIssuerName ());
9696 $ this ->assertSame (null , $ this ->expiredCertificate ->getIssuerName ());
9797 }
9898
99- public function testGetIssuerOrganization () {
100- $ this ->assertSame ('ownCloud Security ' , $ this ->goodCertificate ->getIssuerOrganization ());
99+ public function testGetIssuerOrganization (): void {
100+ $ this ->assertSame ('Nextcloud Security ' , $ this ->goodCertificate ->getIssuerOrganization ());
101101 $ this ->assertSame ('Internet Widgits Pty Ltd ' , $ this ->invalidCertificate ->getIssuerOrganization ());
102102 $ this ->assertSame ('Internet Widgits Pty Ltd ' , $ this ->expiredCertificate ->getIssuerOrganization ());
103103 }
0 commit comments