diff --git a/app/Services/RideService.php b/app/Services/RideService.php index 7c73129..c8d6e05 100644 --- a/app/Services/RideService.php +++ b/app/Services/RideService.php @@ -242,7 +242,7 @@ class RideService 'ride_key' => $rideKey, 'ride_name' => $item->name, 'ride_icon' => (string) ($item->icon ?? '🚘'), - 'effect_title' => "{$user->username} 乘坐【{$item->name}】闪亮登场", + 'effect_title' => "乘坐【{$item->name}】闪亮登场", 'effect_user_info' => $effectUserInfo, 'identity_text' => ChatContentSanitizer::htmlText($identitySummary['inline']), 'welcome_text' => ChatContentSanitizer::htmlText($rendered), diff --git a/tests/Feature/ChatControllerTest.php b/tests/Feature/ChatControllerTest.php index 281e30d..3f93614 100644 --- a/tests/Feature/ChatControllerTest.php +++ b/tests/Feature/ChatControllerTest.php @@ -1134,14 +1134,14 @@ class ChatControllerTest extends TestCase $this->assertNull($entryBroadcast); $this->assertSame('座驾播报', $rideMessage['from_user']); $this->assertSame('j35', $rideMessage['ride_key']); - $this->assertSame("{$user->username} 乘坐【歼-35测试座驾】闪亮登场", $rideMessage['effect_title']); + $this->assertSame('乘坐【歼-35测试座驾】闪亮登场', $rideMessage['effect_title']); $this->assertSame("用户 {$user->username} · 部门 无部门 · 职务 无职务 · 会员 普通会员", $rideMessage['effect_user_info']); $this->assertStringContainsString($user->username, $rideMessage['content']); $this->assertStringContainsString('部门 无部门 · 职务 无职务 · 会员 普通会员', $rideMessage['content']); $this->assertStringNotContainsString("用户 {$user->username} · 部门 无部门", $rideMessage['content']); $this->assertSame('j35', $response->viewData('initialRideEffect')); $this->assertSame([ - 'effect_title' => "{$user->username} 乘坐【歼-35测试座驾】闪亮登场", + 'effect_title' => '乘坐【歼-35测试座驾】闪亮登场', 'effect_user_info' => "用户 {$user->username} · 部门 无部门 · 职务 无职务 · 会员 普通会员", 'ride_name' => '歼-35测试座驾', 'operator' => $user->username,