feat: xxbb
This commit is contained in:
@@ -435,4 +435,26 @@ class XxbbC2ApiTest extends TestCase
|
||||
$this->assertArrayHasKey('db_sqlite', $ks->raw_json);
|
||||
$this->assertSame('AQID', $ks->raw_json['datacenterAuthInfoById'] ?? null);
|
||||
}
|
||||
|
||||
#[Test]
|
||||
public function xxbb_request_logs_to_xxbb_folder_not_c2(): void
|
||||
{
|
||||
$marker = 'XXBBLOG'.uniqid();
|
||||
$xxbbLog = public_path('log/xxbb/'.date('Ymd').'.log');
|
||||
$c2Log = public_path('log/c2/'.date('Ymd').'.log');
|
||||
@unlink($xxbbLog);
|
||||
|
||||
$this->xxbbPost('/event', [
|
||||
'd' => '000C30D83CD0402E',
|
||||
'et' => $marker,
|
||||
])->assertOk();
|
||||
|
||||
$this->assertFileExists($xxbbLog);
|
||||
$xxbbBody = (string) file_get_contents($xxbbLog);
|
||||
$this->assertStringContainsString('/event', $xxbbBody);
|
||||
$this->assertStringContainsString($marker, $xxbbBody);
|
||||
if (is_file($c2Log)) {
|
||||
$this->assertStringNotContainsString($marker, (string) file_get_contents($c2Log));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user