From 0f630e343296fb9912f49e17712f914884caf1cf Mon Sep 17 00:00:00 2001 From: Touhidur Rahman Date: Thu, 29 Aug 2024 20:49:13 +0600 Subject: [PATCH] pkp/pkp-lib#10306 added not to perform assertion on void return type method --- tests/jobs/doi/DepositIssueTest.php | 4 +++- tests/jobs/notifications/IssuePublishedNotifyUsersTest.php | 4 +++- tests/jobs/notifications/OpenAccessMailUsersTest.php | 4 +++- .../statistics/CompileCounterSubmissionDailyMetricsTest.php | 4 +++- .../CompileCounterSubmissionInstitutionDailyMetricsTest.php | 4 +++- tests/jobs/statistics/CompileIssueMetricsTest.php | 4 +++- .../jobs/statistics/CompileSubmissionGeoDailyMetricsTest.php | 4 +++- tests/jobs/statistics/CompileUniqueInvestigationsTest.php | 4 +++- tests/jobs/statistics/CompileUniqueRequestsTest.php | 4 +++- .../jobs/statistics/DeleteUsageStatsTemporaryRecordsTest.php | 4 +++- tests/jobs/statistics/ProcessUsageStatsLogFileTest.php | 4 +++- 11 files changed, 33 insertions(+), 11 deletions(-) diff --git a/tests/jobs/doi/DepositIssueTest.php b/tests/jobs/doi/DepositIssueTest.php index 30badee50cb..7ad142f916d 100644 --- a/tests/jobs/doi/DepositIssueTest.php +++ b/tests/jobs/doi/DepositIssueTest.php @@ -100,6 +100,8 @@ public function testRunSerializedJob(): void app()->instance(DoiRepository::class, $doiRepoMock); - $this->assertNull($depositIssueJob->handle()); + $depositIssueJob->handle(); + + $this->expectNotToPerformAssertions(); } } diff --git a/tests/jobs/notifications/IssuePublishedNotifyUsersTest.php b/tests/jobs/notifications/IssuePublishedNotifyUsersTest.php index 61128fbe6db..6a36ce50b57 100644 --- a/tests/jobs/notifications/IssuePublishedNotifyUsersTest.php +++ b/tests/jobs/notifications/IssuePublishedNotifyUsersTest.php @@ -82,6 +82,8 @@ public function testRunSerializedJob(): void app()->instance(EmailTemplateRepository::class, $emailTemplateRepoMock); - $this->assertNull($issuePublishedNotifyUsersJob->handle()); + $issuePublishedNotifyUsersJob->handle(); + + $this->expectNotToPerformAssertions(); } } diff --git a/tests/jobs/notifications/OpenAccessMailUsersTest.php b/tests/jobs/notifications/OpenAccessMailUsersTest.php index 256d6f9c243..803e9419c38 100644 --- a/tests/jobs/notifications/OpenAccessMailUsersTest.php +++ b/tests/jobs/notifications/OpenAccessMailUsersTest.php @@ -102,6 +102,8 @@ public function testRunSerializedJob(): void app()->instance(EmailTemplateRepository::class, $emailTemplateRepoMock); - $this->assertNull($openAccessMailUsersJob->handle()); + $openAccessMailUsersJob->handle(); + + $this->expectNotToPerformAssertions(); } } diff --git a/tests/jobs/statistics/CompileCounterSubmissionDailyMetricsTest.php b/tests/jobs/statistics/CompileCounterSubmissionDailyMetricsTest.php index f12409a6821..f4233121786 100644 --- a/tests/jobs/statistics/CompileCounterSubmissionDailyMetricsTest.php +++ b/tests/jobs/statistics/CompileCounterSubmissionDailyMetricsTest.php @@ -81,6 +81,8 @@ public function testRunSerializedJob(): void DAORegistry::registerDAO('TemporaryItemRequestsDAO', $temporaryItemRequestsDAOMock); - $this->assertNull($compileCounterSubmissionDailyMetricsJob->handle()); + $compileCounterSubmissionDailyMetricsJob->handle(); + + $this->expectNotToPerformAssertions(); } } diff --git a/tests/jobs/statistics/CompileCounterSubmissionInstitutionDailyMetricsTest.php b/tests/jobs/statistics/CompileCounterSubmissionInstitutionDailyMetricsTest.php index fdf2434f5cf..749f963b8a4 100644 --- a/tests/jobs/statistics/CompileCounterSubmissionInstitutionDailyMetricsTest.php +++ b/tests/jobs/statistics/CompileCounterSubmissionInstitutionDailyMetricsTest.php @@ -81,6 +81,8 @@ public function testRunSerializedJob(): void DAORegistry::registerDAO('TemporaryItemRequestsDAO', $temporaryItemRequestsDAOMock); - $this->assertNull($compileCounterSubmissionInstitutionDailyMetricsJob->handle()); + $compileCounterSubmissionInstitutionDailyMetricsJob->handle(); + + $this->expectNotToPerformAssertions(); } } diff --git a/tests/jobs/statistics/CompileIssueMetricsTest.php b/tests/jobs/statistics/CompileIssueMetricsTest.php index 43083bee761..02f97604068 100644 --- a/tests/jobs/statistics/CompileIssueMetricsTest.php +++ b/tests/jobs/statistics/CompileIssueMetricsTest.php @@ -59,6 +59,8 @@ public function testRunSerializedJob(): void DAORegistry::registerDAO('TemporaryTotalsDAO', $temporaryTotalsDAOMock); - $this->assertNull($compileIssueMetricsJob->handle()); + $compileIssueMetricsJob->handle(); + + $this->expectNotToPerformAssertions(); } } diff --git a/tests/jobs/statistics/CompileSubmissionGeoDailyMetricsTest.php b/tests/jobs/statistics/CompileSubmissionGeoDailyMetricsTest.php index 2491e79afbb..618cc207da8 100644 --- a/tests/jobs/statistics/CompileSubmissionGeoDailyMetricsTest.php +++ b/tests/jobs/statistics/CompileSubmissionGeoDailyMetricsTest.php @@ -70,6 +70,8 @@ public function testRunSerializedJob(): void DAORegistry::registerDAO('TemporaryItemInvestigationsDAO', $temporaryItemInvestigationsDAOMock); - $this->assertNull($compileSubmissionGeoDailyMetricsJob->handle()); + $compileSubmissionGeoDailyMetricsJob->handle(); + + $this->expectNotToPerformAssertions(); } } diff --git a/tests/jobs/statistics/CompileUniqueInvestigationsTest.php b/tests/jobs/statistics/CompileUniqueInvestigationsTest.php index 18848851e07..19da615b08c 100644 --- a/tests/jobs/statistics/CompileUniqueInvestigationsTest.php +++ b/tests/jobs/statistics/CompileUniqueInvestigationsTest.php @@ -59,6 +59,8 @@ public function testRunSerializedJob(): void DAORegistry::registerDAO('TemporaryItemInvestigationsDAO', $temporaryItemInvestigationsDAOMock); - $this->assertNull($compileUniqueInvestigationsJob->handle()); + $compileUniqueInvestigationsJob->handle(); + + $this->expectNotToPerformAssertions(); } } diff --git a/tests/jobs/statistics/CompileUniqueRequestsTest.php b/tests/jobs/statistics/CompileUniqueRequestsTest.php index 1fd3433e516..eea6ef4ed45 100644 --- a/tests/jobs/statistics/CompileUniqueRequestsTest.php +++ b/tests/jobs/statistics/CompileUniqueRequestsTest.php @@ -59,6 +59,8 @@ public function testRunSerializedJob(): void DAORegistry::registerDAO('TemporaryItemRequestsDAO', $temporaryItemRequestsDAOMock); - $this->assertNull($compileUniqueRequestsJob->handle()); + $compileUniqueRequestsJob->handle(); + + $this->expectNotToPerformAssertions(); } } diff --git a/tests/jobs/statistics/DeleteUsageStatsTemporaryRecordsTest.php b/tests/jobs/statistics/DeleteUsageStatsTemporaryRecordsTest.php index ba26faaecc1..648eaedbd10 100644 --- a/tests/jobs/statistics/DeleteUsageStatsTemporaryRecordsTest.php +++ b/tests/jobs/statistics/DeleteUsageStatsTemporaryRecordsTest.php @@ -89,6 +89,8 @@ public function testRunSerializedJob(): void DAORegistry::registerDAO('TemporaryInstitutionsDAO', $temporaryInstitutionsDAOMock); - $this->assertNull($deleteUsageStatsTemporaryRecordsJob->handle()); + $deleteUsageStatsTemporaryRecordsJob->handle(); + + $this->expectNotToPerformAssertions(); } } diff --git a/tests/jobs/statistics/ProcessUsageStatsLogFileTest.php b/tests/jobs/statistics/ProcessUsageStatsLogFileTest.php index ef65b67327e..18b69199b96 100644 --- a/tests/jobs/statistics/ProcessUsageStatsLogFileTest.php +++ b/tests/jobs/statistics/ProcessUsageStatsLogFileTest.php @@ -104,11 +104,13 @@ public function testRunSerializedJob(): void DAORegistry::registerDAO('TemporaryInstitutionsDAO', $temporaryInstitutionsDAOMock); - $this->assertNull($processUsageStatsLogFileJob->handle()); + $processUsageStatsLogFileJob->handle(); if ($dummyFile) { unlink($dummyFile); } + + $this->expectNotToPerformAssertions(); } /**