コード例 #1
0
ファイル: import.php プロジェクト: pdt256/vbscraper
 /**
  * @param $seasonTournamentUrl
  */
 public function importTournamentMatches($seasonTournamentUrl)
 {
     echo 'Tournament: ' . $seasonTournamentUrl . PHP_EOL;
     $content = file_get_contents($seasonTournamentUrl);
     $matches = BvbInfoScraper::getMatches($content);
     $this->matchImporter->import($matches);
 }
コード例 #2
0
 public function xtestImportFromTournament()
 {
     $content = file_get_contents(__DIR__ . '/../2015ManhattanTournament.html');
     $matches = BvbInfoScraper::getMatches($content);
     $this->setCountLogger();
     $importResult = $this->matchImporter->import($matches);
     $this->assertTrue($importResult instanceof MatchImportResult);
     $this->assertSame(103, $importResult->getSuccessCount());
     $this->assertSame(0, $importResult->getFailedCount());
     $this->assertSame(1394, $this->getTotalQueries());
 }