feat: decouple Laravel and CakePHP installers, remove SonarQube artifacts, and enforce complete unit testing standards
- Decouple framework installation: add install-laravel.sh and install-cakephp.sh, isolate skills and docs per framework, and auto-clean leftover artifacts - Remove all SonarQube configs, templates, and references - Enforce comprehensive test completeness: 100% public methods, edge cases, full branch coverage, exception paths, and state assertions - Replace all placeholder assertions in PHPUnit and Pest templates with full realistic implementations - Rename and update 10-comprehensive-test-coverage-guide.md
This commit is contained in:
@@ -5,17 +5,26 @@ declare(strict_types=1);
|
||||
use {{TargetClassFullName}};
|
||||
|
||||
beforeEach(function () {
|
||||
// $this->action = new {{ClassName}}(...);
|
||||
$this->dependencyMock = Mockery::mock('ActionDependencyInterface');
|
||||
$this->action = new {{ClassName}}($this->dependencyMock);
|
||||
});
|
||||
|
||||
describe('{{ClassName}}', function () {
|
||||
it('handles action invocation successfully', function () {
|
||||
// Arrange
|
||||
$payload = ['id' => 10, 'status' => 'active'];
|
||||
$expectedResult = 'processed_result';
|
||||
|
||||
$this->dependencyMock
|
||||
->shouldReceive('process')
|
||||
->once()
|
||||
->with($payload)
|
||||
->andReturn($expectedResult);
|
||||
|
||||
// Act
|
||||
// $result = ($this->action)($dto);
|
||||
$result = ($this->action)($payload);
|
||||
|
||||
// Assert
|
||||
expect(true)->toBeTrue();
|
||||
expect($result)->toBe($expectedResult);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user