15 lines
578 B
PHP
15 lines
578 B
PHP
<?php
|
|
|
|
use App\Support\MedicalReport\TemplateWorkbook;
|
|
|
|
test('template workbook groups fields by departments', function () {
|
|
/** @var TemplateWorkbook $templateWorkbook */
|
|
$templateWorkbook = app(TemplateWorkbook::class);
|
|
|
|
$departments = $templateWorkbook->departments();
|
|
|
|
expect($departments)->not->toBeEmpty();
|
|
expect(collect($departments)->pluck('name'))->toContain('Рентгенологическое отделение');
|
|
expect(collect($departments)->every(fn (array $department): bool => ! empty($department['sources'] ?? [])))->toBeTrue();
|
|
});
|