Skip to content

FireHubTestCase base abstraction #1

Description

@dieselxxx

Affected Version

v0.0.0

Pre-check

  • I have searched existing feature requests and proposals

Problem Statement

Currently, FireHub testing across repositories directly relies on PHPUnit\Framework\TestCase, leading to duplicated setup logic and inconsistent test structure across the ecosystem.

There is no unified abstraction layer that can serve as a stable foundation for FireHub-specific testing rules and future architectural enforcement.

Proposed Feature

Introduce a base testing abstraction:

FireHub\Testing\FireHubTestCase

This class extends PHPUnit’s TestCase and acts as the root testing foundation for the entire FireHub ecosystem.

It will serve as the central point for:

  • shared testing behavior
  • future architecture validation rules
  • consistent test structure across all FireHub packages

Use Case / Motivation

FireHub is a multi-layer ecosystem (Core, Runtime Foundation, Adapters, Capabilities), and requires a consistent testing foundation to ensure:

  • architectural rules are enforced uniformly
  • test structure is reusable across repositories
  • future testing utilities can be added without breaking existing tests
    This abstraction enables FireHub to evolve into a fully governed testing ecosystem rather than fragmented PHPUnit usage per repository.

Proposed API / Design (optional)

namespace FireHub\Testing;

use PHPUnit\Framework\TestCase;

abstract class FireHubTestCase extends TestCase
{
    // Future shared assertions and utilities will be added here
}

Alternatives Considered

  • Direct usage of PHPUnit\Framework\TestCase in each repository
    → rejected due to duplication and lack of standardization
  • Repository-specific base test classes
    → rejected due to fragmentation across FireHub ecosystem

Impact

  • No breaking changes to existing systems
  • Introduces new shared dependency across FireHub testing layer
  • Establishes foundation for future architectural testing enforcement
  • Enables consistent test structure across Core, Runtime, and Adapters

Additional Context

  • ArchitectureAssertions
  • TestBootstrap
  • CoreTestCase
  • IntegrationTestCase
  • CI enforcement rules (PHPStan + PHPUnit integration)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Priority

High

Lifecycle

Completed

Start date

Jun 24, 2026

Started at

Jun 24, 2026

Target date

Jun 24, 2026

Effort

Trivial

Complexity

Simple

Risk

Low

Impact

Major

Projects

Status
Done
Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions