'track', 'type' => 'select', 'label' => '细分赛道', 'label_i18n' => ['en' => 'Track'], ], [ 'key' => 'event_location', 'type' => 'select', 'label' => '意向参赛地点', 'options' => [ ['value' => 'shanghai', 'label' => '上海'], ], ], [ 'key' => 'purpose', 'type' => 'select', 'label' => '观赛目的', 'placeholder' => '请选择观赛目的', 'options' => [ ['value' => 'networking', 'label' => '项目交流'], ], ], [ 'key' => 'company', 'type' => 'text', 'label' => '所属单位', ], ]); $byKey = collect($rows)->keyBy('key'); $this->assertSame('Competition Track', $byKey['track']['label_i18n']['en']); $this->assertSame('Preferred Competition Venue', $byKey['event_location']['label_i18n']['en']); $this->assertSame('Shanghai', $byKey['event_location']['options'][0]['label_i18n']['en']); $this->assertSame('Purpose of Attendance', $byKey['purpose']['label_i18n']['en']); $this->assertSame('Please select a purpose', $byKey['purpose']['placeholder_i18n']['en']); $this->assertSame('Project Networking', $byKey['purpose']['options'][0]['label_i18n']['en']); $this->assertSame('Organization', $byKey['company']['label_i18n']['en']); } public function test_track_titles_match_prototype_english(): void { $titles = SignupFieldI18n::trackTitlesEn(); $this->assertSame('Scenarios & Applications', $titles['场景与应用']); $this->assertSame('Materials & Chips', $titles['材料与芯片']); $this->assertSame('Devices & Modules', $titles['器件与模块']); $this->assertSame('Equipment & Services', $titles['设备与服务']); } public function test_prototype_tracks_use_latest_user_form_names(): void { $titles = array_column(SignupFieldI18n::prototypeTracks(), 'title'); $this->assertSame(['材料与芯片', '器件与模块', '场景与应用', '设备与服务'], $titles); $this->assertSame( 'Original breakthroughs in optoelectronic new materials, optical chips and core components, covering indium phosphide, silicon photonics, lithium niobate processes, plus innovations in lasers, modulators, detector chips, supporting electronic chips and optical components.', SignupFieldI18n::trackDescriptionsEn()['材料与芯片'], ); } }