<?php

namespace Tests\Unit;


use Tests\TestCase;

class ExampleTest extends TestCase
{
    /**
     * A basic test example.
     *
     * @return void
     */
    public function test_that_true_is_true()
    {
        $this->assertTrue(true);
    }

    public function testmyLog() {
        myLog('test1111')->info('kkkkk');
    }

    public function testDate() {
        $str = 'php artisan ContentManage:SyncCpSubscribeStatisticDataFromZW --startDate=%s --endDate=%s';

        $startDate = '2023-04-01';
        $newStr = '';
        foreach (range(1, 32) as $i) {
            $endDate = date_add(date_create($startDate), date_interval_create_from_date_string('1 day'))->format('Y-m-d');
//            dump(sprintf($str, $startDate, $endDate));
            $newStr .= sprintf($str, $startDate, $endDate) . "\r\n";
            $startDate = $endDate;
        }
        dump($newStr);
    }
}