Перевод на доменную архитектуру
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
use App\Console\Commands\FillReportsFromDate;
|
||||
use App\Application\Reports\ReportSavePathService;
|
||||
use App\Models\Department;
|
||||
use App\Models\User;
|
||||
use App\Services\AutoReportService;
|
||||
@@ -279,7 +280,11 @@ it('creates auto-filled report through report service with auto flag and scoped
|
||||
})
|
||||
->andReturn(new \App\Models\Report);
|
||||
|
||||
$service = new AutoReportService($reportService, app(DateRangeService::class));
|
||||
$service = new AutoReportService(
|
||||
$reportService,
|
||||
app(DateRangeService::class),
|
||||
\Mockery::mock(ReportSavePathService::class),
|
||||
);
|
||||
|
||||
expect($service->createReportForDate($user, $department, autoFillRange(), false))->toBeTrue();
|
||||
});
|
||||
@@ -343,7 +348,11 @@ it('force recreation removes previous report scoped data before storing a new au
|
||||
->once()
|
||||
->andReturn(new \App\Models\Report);
|
||||
|
||||
$service = new AutoReportService($reportService, app(DateRangeService::class));
|
||||
$service = new AutoReportService(
|
||||
$reportService,
|
||||
app(DateRangeService::class),
|
||||
\Mockery::mock(ReportSavePathService::class),
|
||||
);
|
||||
|
||||
expect($service->createReportForDate($user, $department, autoFillRange(), true))->toBeTrue()
|
||||
->and(DB::table('reports')->where('report_id', 55)->exists())->toBeFalse()
|
||||
|
||||
Reference in New Issue
Block a user