feat: manifest checks, Divi compatibility from manifests, reference fingerprints
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -19,21 +19,12 @@ use ReflectionClass;
|
||||
*/
|
||||
final class DiviBoundaryTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* Files that still touch Divi outside an adapter (paths below src/). Tasks 3–7
|
||||
* shrink this list to DiviCompatibility.php; Task 8 removes it together with
|
||||
* testLegacyFilesStillTouchDivi.
|
||||
*/
|
||||
private const LEGACY = [
|
||||
'Integrations/Divi/DiviCompatibility.php',
|
||||
];
|
||||
|
||||
public function testOnlyAdaptersTouchDivi(): void
|
||||
{
|
||||
$offenders = [];
|
||||
foreach (self::sourceFiles() as $relative => $path) {
|
||||
$touches = DiviTouches::inFile($path);
|
||||
if ($touches === [] || in_array($relative, self::LEGACY, true)) {
|
||||
if ($touches === []) {
|
||||
continue;
|
||||
}
|
||||
if (! in_array(self::classOf($relative), DiviAdapters::CLASSES, true)) {
|
||||
@@ -45,16 +36,6 @@ final class DiviBoundaryTest extends TestCase
|
||||
. implode("\n", $offenders));
|
||||
}
|
||||
|
||||
public function testLegacyFilesStillTouchDivi(): void
|
||||
{
|
||||
$files = self::sourceFiles();
|
||||
foreach (self::LEGACY as $relative) {
|
||||
self::assertArrayHasKey($relative, $files, $relative . ' gibt es nicht mehr – aus LEGACY streichen');
|
||||
self::assertNotSame([], DiviTouches::inFile($files[$relative]), $relative . ' ist sauber – aus LEGACY streichen');
|
||||
self::assertNotContains(self::classOf($relative), DiviAdapters::CLASSES, $relative . ' ist ein Adapter');
|
||||
}
|
||||
}
|
||||
|
||||
public function testAdaptersDeclareExactlyTheDiviNamesTheyUse(): void
|
||||
{
|
||||
foreach (DiviAdapters::CLASSES as $class) {
|
||||
|
||||
Reference in New Issue
Block a user