Files
Investidor-V2/tests/Unit/EconomicReferenceManifestTest.php
paulomassigue 14ad2f60c5
tests / ci (push) Canceled after 0s
header:navbar e footer
2026-10-19 13:07:16 +02:00

21 lines
783 B
PHP

<?php
namespace Tests\Unit;
use App\Services\EconomicReferenceCatalog;
use PHPUnit\Framework\TestCase;
class EconomicReferenceManifestTest extends TestCase
{
public function test_the_distributed_manifest_matches_the_existing_approved_byte_hash(): void
{
$path = dirname(__DIR__, 2).'/database/data/economic-references-lot-01.json';
$this->assertSame(EconomicReferenceCatalog::MANIFEST_SHA256, hash_file('sha256', $path));
$manifest = json_decode(file_get_contents($path), true, 512, JSON_THROW_ON_ERROR);
$this->assertSame(EconomicReferenceCatalog::LOT, $manifest['lot']);
$this->assertCount(5, $manifest['activities']);
$this->assertCount(5, $manifest['chains']);
$this->assertCount(4, $manifest['links']);
}
}