@@ -146,9 +146,18 @@ class InvestmentUnificationTest extends TestCase
|
||||
|
||||
public function test_territorial_filters_intersect_and_hide_withdrawn_relations(): void
|
||||
{
|
||||
$this->artisan('portfolio:import', ['--approval' => 'Autorização sintética exclusivamente para teste.'])->assertSuccessful();
|
||||
$this->artisan('portfolio:import')->assertSuccessful();
|
||||
$clusters = InvestmentDossier::whereNotNull('cluster_id')->limit(2)->get();
|
||||
$corridor = InvestmentDossier::whereNotNull('corridor_id')->firstOrFail();
|
||||
// Explicitly published synthetic fixtures; import itself keeps all dossiers private.
|
||||
$editor = User::factory()->create();
|
||||
$reviewer = User::factory()->create();
|
||||
$publishFixture = fn (InvestmentDossier $dossier) => $dossier->update([
|
||||
'publication_status' => 'published', 'published_at' => now(), 'editor_id' => $editor->id,
|
||||
'reviewer_id' => $reviewer->id, 'approval_evidence' => 'Synthetic independent review fixture', 'approval_basis' => 'manager',
|
||||
]);
|
||||
$clusters->each($publishFixture);
|
||||
$publishFixture($corridor);
|
||||
$opportunity = $this->opportunity();
|
||||
foreach ($clusters as $cluster) {
|
||||
DB::table('opportunity_clusters')->insert(['opportunity_id' => $opportunity->id, 'cluster_id' => $cluster->cluster_id]);
|
||||
|
||||
Reference in New Issue
Block a user