DateTestTest.php 511 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace OrderCountingRecordService;
  3. use Carbon\Carbon;
  4. use DateInterval;
  5. use DatePeriod;
  6. use DateTime;
  7. use Tests\TestCase;
  8. class DateTestTest extends TestCase
  9. {
  10. /**
  11. * @test
  12. */
  13. public function carbon_date_equals()
  14. {
  15. $this->assertTrue('2020-11-25' == Carbon::now()->format('Y-m-d'));
  16. $this->assertTrue('2020-48' == Carbon::now()->year . '-' . Carbon::now()->week);
  17. $this->assertTrue('2020-11' == Carbon::now()->year . '-' . Carbon::now()->month);
  18. }
  19. }