PHPUnit Extension

Run architecture checks as part of your test suite.

Contents

  1. Register The Extension
  2. Behavior
  3. When To Use It

Register The Extension

<!-- phpunit.xml -->
<extensions>
    <bootstrap class="Boundwize\StructArmed\PHPUnit\StructArmedExtension"/>
</extensions>

Behavior

Violations cause the test run to fail before any tests execute. This makes architecture checks part of the same feedback loop as your normal PHPUnit suite.

When To Use It

Use the extension when a project already treats PHPUnit as the main local or CI verification command. If your CI pipeline separates static analysis and tests, running vendor/bin/structarmed analyse as a dedicated step may be clearer.