Added API endpoints to fetch invoices (#5070)
* added serializer attributes for API usage * new setters to fill invoice data from fixture * re-usable fixture helper methods * added API endpoints to fetch invoices * adjust tests
This commit is contained in:
@@ -19,6 +19,8 @@ use Faker\Factory;
|
||||
*/
|
||||
final class ActivityFixtures implements TestFixture
|
||||
{
|
||||
use FixturesTrait;
|
||||
|
||||
private int $amount = 0;
|
||||
private bool $isGlobal = false;
|
||||
private ?bool $isVisible = null;
|
||||
@@ -127,20 +129,4 @@ final class ActivityFixtures implements TestFixture
|
||||
|
||||
return $created;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ObjectManager $manager
|
||||
* @return array<int|string, Project>
|
||||
*/
|
||||
private function getAllProjects(ObjectManager $manager): array
|
||||
{
|
||||
$all = [];
|
||||
/** @var Project[] $entries */
|
||||
$entries = $manager->getRepository(Project::class)->findAll();
|
||||
foreach ($entries as $temp) {
|
||||
$all[$temp->getId()] = $temp;
|
||||
}
|
||||
|
||||
return $all;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user