0dce2ef812
- Enforce mandatory handle() and failed() method testing for all Jobs and Commands - Ban shallow reflection-only helper testing in Jobs - Mandate actual SQLite in-memory query execution for Repositories (ban Builder::class assertions alone) - Enforce full branch coverage for SonarQube (ternary, null-coalescing, catch blocks, match) - Update JobTest templates for PHPUnit and Pest to include handle() and failed() methods - Update verification checklist and master system prompt with strict branch gatekeepers Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
32 lines
695 B
PHP
32 lines
695 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use {{TargetClassFullName}};
|
|
|
|
describe('{{ClassName}}', function () {
|
|
it('handles job execution successfully', function () {
|
|
// Arrange
|
|
// $dependencyMock = Mockery::mock(Service::class);
|
|
// $job = new {{ClassName}}(...);
|
|
|
|
// Act
|
|
// $job->handle($dependencyMock);
|
|
|
|
// Assert
|
|
expect(true)->toBeTrue();
|
|
});
|
|
|
|
it('handles job failure cleanly', function () {
|
|
// Arrange
|
|
// $job = new {{ClassName}}(...);
|
|
// $exception = new \RuntimeException('Job failed');
|
|
|
|
// Act
|
|
// $job->failed($exception);
|
|
|
|
// Assert
|
|
expect(true)->toBeTrue();
|
|
});
|
|
});
|