<?php

namespace LaborReportsCountingRecordService;

use App\Services\CacheService;
use App\Services\LaborReportsCountingRecordService;
use App\Services\OrderCountingRecordService;
use Illuminate\Support\Facades\Cache;
use Tests\TestCase;

class GetTest extends TestCase
{
    /** @var LaborReportsCountingRecordService $laborReportsCountingRecordService */
    public $laborReportsCountingRecordService;

    public function setUp(): void
    {
        parent::setUp();
        $this->laborReportsCountingRecordService = new LaborReportsCountingRecordService();
    }

    public function testGet日()
    {
        $start = '2020-11-08';
        $end = '2020-12-19';
        $unit = '日';
        $result =  $this->laborReportsCountingRecordService->get($start, $end, $unit);
        self::assertTrue($result->isNotEmpty());
    }

    public function testGet周()
    {
        $start = '2020-11-08';
        $end = '2020-12-19';
        $unit = '周';
        $result =  $this->laborReportsCountingRecordService->get($start, $end, $unit);
        self::assertTrue($result->isNotEmpty());
    }

    public function testGet月()
    {
        $start = '2020-08-01';
        $end = '2020-11-1';
        $unit = '月';
        $result =  $this->laborReportsCountingRecordService->get($start, $end, $unit);
        self::assertTrue($result->isNotEmpty());
    }
}
