21 lines
643 B
PHP
21 lines
643 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace MintyPHP\Tests\Architecture;
|
||
|
|
|
||
|
|
use PHPUnit\Framework\TestCase;
|
||
|
|
|
||
|
|
final class StatusTaxonomyLiteralGuardContractTest extends TestCase
|
||
|
|
{
|
||
|
|
use ProjectFileAssertionSupport;
|
||
|
|
|
||
|
|
public function testNoLegacyLiteralTaxonomyChecksRemainInMigratedFiles(): void
|
||
|
|
{
|
||
|
|
foreach (StatusTaxonomyContractFiles::taxonomyLiteralGuardFiles() as $file) {
|
||
|
|
$content = $this->readProjectFile($file);
|
||
|
|
foreach (StatusTaxonomyContractFiles::forbiddenLiteralPatterns() as $pattern) {
|
||
|
|
$this->assertSame(0, preg_match($pattern, $content), $file . ' pattern=' . $pattern);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|