Skip to content

Commit

Permalink
pkp/pkp-lib#10306 added not to perform assertion on void return type …
Browse files Browse the repository at this point in the history
…method
  • Loading branch information
touhidurabir committed Nov 14, 2024
1 parent 2151e46 commit aed2042
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 11 deletions.
4 changes: 3 additions & 1 deletion tests/jobs/doi/DepositIssueTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ public function testRunSerializedJob(): void

app()->instance(DoiRepository::class, $doiRepoMock);

$this->assertNull($depositIssueJob->handle());
$depositIssueJob->handle();

$this->expectNotToPerformAssertions();
}
}
4 changes: 3 additions & 1 deletion tests/jobs/notifications/IssuePublishedNotifyUsersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ public function testRunSerializedJob(): void

app()->instance(EmailTemplateRepository::class, $emailTemplateRepoMock);

$this->assertNull($issuePublishedNotifyUsersJob->handle());
$issuePublishedNotifyUsersJob->handle();

$this->expectNotToPerformAssertions();
}
}
4 changes: 3 additions & 1 deletion tests/jobs/notifications/OpenAccessMailUsersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ public function testRunSerializedJob(): void

app()->instance(EmailTemplateRepository::class, $emailTemplateRepoMock);

$this->assertNull($openAccessMailUsersJob->handle());
$openAccessMailUsersJob->handle();

$this->expectNotToPerformAssertions();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ public function testRunSerializedJob(): void
DAORegistry::registerDAO('TemporaryItemRequestsDAO', $temporaryItemRequestsDAOMock);


$this->assertNull($compileCounterSubmissionDailyMetricsJob->handle());
$compileCounterSubmissionDailyMetricsJob->handle();

$this->expectNotToPerformAssertions();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ public function testRunSerializedJob(): void
DAORegistry::registerDAO('TemporaryItemRequestsDAO', $temporaryItemRequestsDAOMock);


$this->assertNull($compileCounterSubmissionInstitutionDailyMetricsJob->handle());
$compileCounterSubmissionInstitutionDailyMetricsJob->handle();

$this->expectNotToPerformAssertions();
}
}
4 changes: 3 additions & 1 deletion tests/jobs/statistics/CompileIssueMetricsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ public function testRunSerializedJob(): void

DAORegistry::registerDAO('TemporaryTotalsDAO', $temporaryTotalsDAOMock);

$this->assertNull($compileIssueMetricsJob->handle());
$compileIssueMetricsJob->handle();

$this->expectNotToPerformAssertions();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ public function testRunSerializedJob(): void

DAORegistry::registerDAO('TemporaryItemInvestigationsDAO', $temporaryItemInvestigationsDAOMock);

$this->assertNull($compileSubmissionGeoDailyMetricsJob->handle());
$compileSubmissionGeoDailyMetricsJob->handle();

$this->expectNotToPerformAssertions();
}
}
4 changes: 3 additions & 1 deletion tests/jobs/statistics/CompileUniqueInvestigationsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ public function testRunSerializedJob(): void

DAORegistry::registerDAO('TemporaryItemInvestigationsDAO', $temporaryItemInvestigationsDAOMock);

$this->assertNull($compileUniqueInvestigationsJob->handle());
$compileUniqueInvestigationsJob->handle();

$this->expectNotToPerformAssertions();
}
}
4 changes: 3 additions & 1 deletion tests/jobs/statistics/CompileUniqueRequestsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ public function testRunSerializedJob(): void

DAORegistry::registerDAO('TemporaryItemRequestsDAO', $temporaryItemRequestsDAOMock);

$this->assertNull($compileUniqueRequestsJob->handle());
$compileUniqueRequestsJob->handle();

$this->expectNotToPerformAssertions();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ public function testRunSerializedJob(): void

DAORegistry::registerDAO('TemporaryInstitutionsDAO', $temporaryInstitutionsDAOMock);

$this->assertNull($deleteUsageStatsTemporaryRecordsJob->handle());
$deleteUsageStatsTemporaryRecordsJob->handle();

$this->expectNotToPerformAssertions();
}
}
4 changes: 3 additions & 1 deletion tests/jobs/statistics/ProcessUsageStatsLogFileTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,13 @@ public function testRunSerializedJob(): void

DAORegistry::registerDAO('TemporaryInstitutionsDAO', $temporaryInstitutionsDAOMock);

$this->assertNull($processUsageStatsLogFileJob->handle());
$processUsageStatsLogFileJob->handle();

if ($dummyFile) {
unlink($dummyFile);
}

$this->expectNotToPerformAssertions();
}

/**
Expand Down

0 comments on commit aed2042

Please sign in to comment.