Exemplo n.º 1
0
 public function testLoad()
 {
     $mapperWeb = new LeaguesMapperWeb();
     $mapperDb = new LeaguesMapperDb();
     $leagues = $mapperWeb->load();
     $mapperDb->save($leagues[600]);
     $leaguesFromDb = $mapperDb->load();
     $this->assertEquals(1, count($leaguesFromDb));
     $mapperDb->save($leagues[65000]);
     $leaguesFromDb = $mapperDb->load();
     $this->assertEquals(2, count($leaguesFromDb));
 }
Exemplo n.º 2
0
 public static function setUpBeforeClass()
 {
     $leaguesMapperWeb = new LeaguesMapperWeb();
     $leagues = $leaguesMapperWeb->load();
     $leaguesMapperDb = new LeaguesMapperDb();
     $leaguesMapperDb->save($leagues[600]);
 }
 public static function setUpBeforeClass()
 {
     $db = Db::obtain();
     $db->exec('DELETE FROM ' . Db::realTablename('league_prize_pools') . '');
     $leaguesMapperWeb = new LeaguesMapperWeb();
     $leagues = $leaguesMapperWeb->load();
     $leaguesMapperDb = new LeaguesMapperDb();
     $leaguesMapperDb->save($leagues[600]);
 }
Exemplo n.º 4
0
 public static function setUpBeforeClass()
 {
     $leaguesMapperWeb = new LeaguesMapperWeb();
     $leagues = $leaguesMapperWeb->load();
     $leaguesMapperDb = new LeaguesMapperDb();
     $leaguesMapperDb->save($leagues[600]);
     $matchMapperWeb = new MatchMapperWeb(683300315);
     $match = $matchMapperWeb->load();
     $matchMapperDb = new MatchMapperDb();
     $matchMapperDb->save($match);
 }
Exemplo n.º 5
0
 public function setUp()
 {
     $leaguesMapperWeb = new LeaguesMapperWeb();
     $leagues = $leaguesMapperWeb->load();
     $leaguesMapperDb = new LeaguesMapperDb();
     $leaguesMapperDb->save($leagues[$this->leagueId]);
     $matchMapperWeb = new MatchMapperWeb($this->matchId);
     $match = $matchMapperWeb->load();
     $matchMapperDb = new MatchMapperDb();
     $matchMapperDb->save($match);
 }