Skip to content

Remove duplicate TestCase (dedup + composer autoload) #4

Description

@jbagsik

Context

SonarQube flagged duplicated lines on the moox/verapdf branch (mooxphp/moox feature/add-verapdf-package). The package ships two identical TestCase filessrc/Tests/TestCase.php and tests/TestCase.php — both declaring the same class Moox\VeraPdf\Tests\TestCase (they only coexist via an in-file autoloader shim). This is the 96% / ~72-line duplication hit and a genuine copy-paste defect.

What to build

The package has exactly one Moox\VeraPdf\Tests\TestCase, resolved through composer autoloading, with no duplicate file and no runtime autoloader shim.

Acceptance criteria

  • Only one TestCase file remains (keep the canonical location per package convention; the redundant copy is deleted).
  • composer.json autoload-dev maps Moox\VeraPdf\Tests\ to the kept location; the in-file PSR-4 autoloader shim is removed.
  • Pest.php still resolves TestCase; the full package suite runs green.
  • SonarQube no longer reports duplication for the removed file.

Blocked by

None — can start immediately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentSpec is ready for an agent to implement

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions