'investimentos nos corredores.docx', 'source_sha256' => CorridorAgribusinessOpportunities::SOURCE_HASH, 'corridor' => 'Corredor de Maputo']; $body = 'Produção de arroz.'."\n\nFonte: ".$source['source'].'; SHA-256 '.$source['source_sha256']."\n\n".CorridorAgribusinessOpportunities::LIMITATIONS; $record = new Opportunity(['description' => $body]); $record->workflow_context = ['corridor_agribusiness' => $source]; $public = $record->toArray(); $this->assertStringContainsString('Produção de arroz.', $public['description']); $this->assertStringNotContainsString('SHA-256', $public['description']); $this->assertStringNotContainsString('.docx', $public['description']); $this->assertSame($body, $record->description); $this->assertArrayNotHasKey('workflow_context', $public); $other = new Opportunity(['description' => $body]); $this->assertSame($body, OpportunityPublicText::description($other, $body)); $this->assertSame('Texto revisto pela equipa.', OpportunityPublicText::description($record, 'Texto revisto pela equipa.')); } }