Skip to content

Commit 97f0a7a

Browse files
committed
feat: add octane
1 parent 22f21e8 commit 97f0a7a

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

app/Support/Gametype/GametypeHelper.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,10 @@ public static function findBaseGametype(Gamevariant $gamevariant): BaseGametype
121121
return BaseGametype::ASSAULT();
122122
}
123123

124+
if (Str::contains($name, 'Octane', true)) {
125+
return BaseGametype::GRIFBALL();
126+
}
127+
124128
throw new \InvalidArgumentException("Unable to find base gametype for: {$name}");
125129
}
126130
}

tests/Feature/Console/RefreshOverviewsTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ public function test_valid_generation_of_overviews(): void
7272
->createOne([
7373
'name' => 'Classic',
7474
]);
75+
$octane = Gamevariant::factory()
76+
->createOne([
77+
'name' => 'Octane',
78+
]);
7579

7680
$map1 = Map::factory()->createOne([
7781
'name' => 'Absolute',
@@ -162,6 +166,11 @@ public function test_valid_generation_of_overviews(): void
162166
'gamevariant_id' => $hotswap->id,
163167
]);
164168

169+
Game::factory()->createOne([
170+
'map_id' => $map1->id,
171+
'gamevariant_id' => $octane->id,
172+
]);
173+
165174
// Act
166175
$this->artisan('analytics:overviews:refresh')
167176
->expectsOutputToContain('Processed '.$game->map->name)

0 commit comments

Comments
 (0)