| 12345678910111213141516171819202122232425262728293031323334 |
- <?php
- namespace Tests\Unit;
- use GuzzleHttp\Client;
- class CommonTest extends \Tests\TestCase
- {
- protected Client $client;
- protected string $baseUrl = ''; // 修改为实际运行的服务器地址
- public function setUp(): void
- { parent::setUp();
- $this->baseUrl = env('UNITTEST_URL', 'http://localhost:8000');
- $this->client = new Client([
- 'base_uri' => $this->baseUrl,
- 'timeout' => 5.0,
- 'http_errors' => false,
- 'verify' => false // 禁用 SSL 验证
- ]);
- }
- public function testA()
- {
- }
- }
|