WechatOrderCronTest.php 665 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. declare(strict_types=1);
  3. namespace SixShop\Lakala\Cron;
  4. use PHPUnit\Framework\Attributes\Test;
  5. use PHPUnit\Framework\TestCase;
  6. use think\facade\Db;
  7. class WechatOrderCronTest extends TestCase
  8. {
  9. private WechatOrderCron $wechatOrderCron;
  10. protected function setUp(): void
  11. {
  12. Db::listen(function ($sql, $time, $explain) {
  13. dump($sql);
  14. });
  15. $this->wechatOrderCron = app(WechatOrderCron::class);
  16. }
  17. #[Test]
  18. public function orderShipping()
  19. {
  20. $this->wechatOrderCron->orderShipping();
  21. }
  22. #[Test]
  23. public function orderExpire()
  24. {
  25. $this->wechatOrderCron->orderExpire();
  26. }
  27. }