public function testGetSeasonUrls() { $content = file_get_contents(__DIR__ . '/AllSeasons.html'); $seasonUrls = BvbInfoScraper::getSeasonUrls($content); $this->assertSame('Season.asp?AssocID=1&Year=2015', $seasonUrls[0]); $this->assertSame('Season.asp?AssocID=4&Year=1948', $seasonUrls[240]); $this->assertSame(241, count($seasonUrls)); }
public function execute() { $content = file_get_contents($this->bvbBase . 'season.asp'); $seasonUrls = BvbInfoScraper::getSeasonUrls($content); foreach (array_reverse($seasonUrls) as $seasonUrl) { $seasonUrl = $this->bvbBase . $seasonUrl; $this->importSeason($seasonUrl); } }