44 lines
939 B
PHP
44 lines
939 B
PHP
<?php
|
|
|
|
namespace Tests\Unit\Models;
|
|
|
|
use App\Jobs\ProjectDownloadTiffJob;
|
|
use App\Jobs\ProjectMosiacGeneratorJob;
|
|
use App\Jobs\ProjectReportGeneratorJob;
|
|
use App\Models\Project;
|
|
|
|
use App\Models\ProjectMosaic;
|
|
use Illuminate\Bus\PendingBatch;
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
use Illuminate\Support\Carbon;
|
|
use Illuminate\Support\Facades\Bus;
|
|
use Mockery;
|
|
use Tests\TestCase;
|
|
|
|
class ProjectMosaicTest extends TestCase
|
|
{
|
|
use RefreshDatabase;
|
|
|
|
|
|
/**
|
|
* @test
|
|
* @dataProvider filenameProvider
|
|
* */
|
|
public function it_should_return_the_correct_attachment_path($year,$week, $expected)
|
|
{
|
|
$this->assertEquals(
|
|
$expected,
|
|
ProjectMosaic::getFilenameForYearAndWeek($year, $week)
|
|
);
|
|
}
|
|
|
|
|
|
public static function filenameProvider(){
|
|
return [
|
|
[2022, 1, 'week_01_2022.tif'],
|
|
[2022, 10, 'week_10_2022.tif'],
|
|
];
|
|
|
|
}
|
|
}
|