-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Description
Currently, the extension has limited test coverage (~25%) with tests only for domain models. We need comprehensive test coverage for controllers, services, commands, and repositories.
Current State
Tested (4 files):
- Domain models only (Component, Environment, Translation, Type)
Not Tested:
- Controllers (TranslationController)
- Services (TranslationService, ImportService)
- ViewHelpers (TextdbViewHelper, TranslateViewHelper)
- Command classes (ImportCommand)
- Repositories (query methods)
Proposed Changes
1. Controller Tests
Tests/Unit/Controller/TranslationControllerTest.php- Test all actions: list, translated, translateRecord, import, export
- Mock dependencies (repositories, services)
2. Service Tests
Tests/Unit/Service/TranslationServiceTest.phpTests/Unit/Service/ImportServiceTest.php- Test business logic and error handling
3. Functional Tests
Tests/Functional/Domain/Repository/- Test repository queriesTests/Functional/Service/- Test import/export workflows- Use fixtures and database state
4. ViewHelper Tests
Tests/Unit/ViewHelpers/TextdbViewHelperTest.phpTests/Unit/ViewHelpers/TranslateViewHelperTest.php
Acceptance Criteria
- Test coverage reaches 60%+
- All controllers have unit tests
- All services have unit tests with mocking
- Functional tests for import/export workflows
- Repository query methods have functional tests
- PHPUnit configuration for functional tests exists
- CI pipeline runs all tests successfully
Priority
High - Improves code quality and prevents regressions
Related
TYPO3 Conformance Report: Testing Standards score 17/20 (can reach 20/20 with proper coverage)
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request