WechatOrderCronTest.php 559 B

12345678910111213141516171819202122232425
  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. $this->wechatOrderCron = app(WechatOrderCron::class);
  13. }
  14. #[Test]
  15. public function orderShipping()
  16. {
  17. Db::listen(function ($sql, $time, $explain) {
  18. dump($sql);
  19. });
  20. $this->wechatOrderCron->orderShipping();
  21. }
  22. }