LogTest.php 576 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. declare(strict_types=1);
  3. namespace SixShop\System;
  4. use PHPUnit\Framework\Attributes\Test;
  5. use PHPUnit\Framework\TestCase;
  6. class LogTest extends TestCase
  7. {
  8. private Log $log;
  9. protected function setUp(): void
  10. {
  11. $this->log = app()->make(Log::class, ['extensionID' => 'system'], true);
  12. }
  13. #[Test]
  14. public function debug()
  15. {
  16. $this->log->debug('test1');
  17. \think\facade\Log::debug('test2');
  18. }
  19. #[Test]
  20. public function feishu()
  21. {
  22. $this->log->error('test1');
  23. $this->log->error('test2');
  24. }
  25. }