/**
  * @test
  */
 public function minesAdventCoins()
 {
     PHPMockery::mock(__NAMESPACE__, 'md5')->andReturnUsing(function ($key) {
         if ($key == 'foo5') {
             return '00000a1hR0sicfrPkvc7XgkO01eoOghM';
         }
         return 'iQMU4kZAjXskKQ8q5egoZph0O07nhLUc';
     });
     $this->assertEquals(5, AdventCoinMiner::mine('foo'));
     \Mockery::close();
 }
Esempio n. 2
0
 /** @inheritdoc */
 public function part2()
 {
     return strval(AdventCoinMiner::mine($this->inputProvider->getInputFromFileForDay(4), '000000'));
 }