create([ 'slug' => 'hsxt-other-track', 'name' => '首届沪苏协同新兴产业青年科创大赛', 'published' => true, ]); $this->seed(CompetitionDefaultTracksSeeder::class); $source = CompetitionTrack::query() ->where('competition_id', $competition->id) ->where('track_code', 'guang_xinpian') ->first(); $other = CompetitionTrack::query() ->where('competition_id', $competition->id) ->where('track_code', 'other') ->first(); $this->assertNotNull($source); $this->assertNotNull($other); $this->assertSame('其他', $other->title); $this->assertSame('Other', $other->title_en); $this->assertSame('', (string) $other->description); $this->assertSame($source->scoring_sheet_json['items'] ?? null, $other->scoring_sheet_json['items'] ?? null); $this->assertSame( DefaultTrackScoringSheets::CONTEST_SHEET_PREFIX.'(其他赛道)', $other->scoring_sheet_json['title'] ?? null, ); $this->assertSame( DefaultTrackScoringSheets::CONTEST_SHEET_PREFIX.'(材料与芯片赛道)', $source->scoring_sheet_json['title'] ?? null, ); } }