Created
March 31, 2020 08:21
-
-
Save RomainMazB/727412f9aa875f3ffebb99399af96e79 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function testUserCanGetAllAchievements(): void | |
{ | |
for($i = 0; $i < 3; $i++) { | |
$this->city->buildings->nursery->populate(10, 'warrior'); | |
$this->city->buildings->nursery->sacrifyEggs(10, 'egg'); | |
} | |
$larvae_offset = config('game.total_development_time.end') - config('game.development_times.larvae.end') + 25; | |
for($i = 0; $i < 3; $i++) { | |
$this->city->buildings->nursery->populate(10, 'warrior'); | |
// Update the born_time to make them Larvae | |
DB::update("UPDATE ants SET born_time = NOW() + CONCAT(?::INT, ' minutes')::INTERVAL", [$larvae_offset]); | |
$this->city->buildings->nursery->sacrifyEggs(10, 'larvae'); | |
} | |
$larvae_offset = config('game.total_development_time.end') - config('game.development_times.pupae.end') + 25; | |
for($i = 0; $i < 3; $i++) { | |
$this->city->buildings->nursery->populate(10, 'warrior'); | |
// Update the born_time to make them Larvae | |
DB::update("UPDATE ants SET born_time = NOW() + CONCAT(?::INT, ' minutes')::INTERVAL", [$larvae_offset]); | |
$this->city->buildings->nursery->sacrifyEggs(10, 'pupae'); | |
} | |
$this->assertCount(4, $this->city->buildings->royal_room->getAllAchievements()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment