<?php

namespace MintyPHP\Tests\Architecture;

use PHPUnit\Framework\TestCase;

final class DetailValidationActionContractTest extends TestCase
{
    use ProjectFileAssertionSupport;

    public function testScopedDetailActionsProvideStructuredValidationSummaryErrors(): void
    {
        foreach (DetailValidationContractFiles::detailActionFiles() as $file) {
            $content = $this->readProjectFile($file);
            $this->assertStringContainsString('$validationSummaryErrors = $errorBag->toArray();', $content, $file);
        }
    }
}
