<commit_before><?php

class teams_mapper_webTest extends PHPUnit_Framework_TestCase
{
    /**
     * @var teams_mapper_web
     */
    protected $mapper;

    protected function setUp() {
        $this->mapper = new teams_mapper_web();
    }

    public function testLoad() {

        $this->mapper->set_team_id(36)->set_teams_requested(1);
        $teams = $this->mapper->load();

        $this->assertEquals(count($teams), 1);
        $this->assertEquals($teams[0]->get('team_id'), 36);
        $this->assertEquals($teams[0]->get('name'), '<NAME>');
        $this->assertEquals($teams[0]->get('tag'), 'Na`Vi');
        $this->assertEquals($teams[0]->get('country_code'), 'ua');
        $this->assertGreaterThan(count($teams[0]->get_all_players_ids()), 0);
        $this->assertGreaterThan(count($teams[0]->get_all_leagues_ids()), 0);
    }

    public function testLoadMultiple() {

        $this->mapper->set_team_id(36)->set_teams_requested(2);
        $teams = $this->mapper->load();
        $this->assertEquals(count($teams), 2);

        $this->assertEquals($teams[0]->get('team_id'), 36);
        $this->assertEquals($teams[0]->get('name'), '<NAME>');
        $this->assertEquals($teams[0]->get('tag'), 'Na`Vi');
        $this->assertEquals($teams[0]->get('country_code'), 'ua');
        $this->assertGreaterThan(count($teams[0]->get_all_players_ids()), 0);
        $this->assertGreaterThan(count($teams[0]->get_all_leagues_ids()), 0);

        $this->assertEquals($teams[1]->get('team_id'), 39);
        $this->assertEquals($teams[1]->get('name'), '<NAME>');
        $this->assertEquals($teams[1]->get('tag'), 'EG');
        $this->assertEquals($teams[1]->get('country_code'), 'us');
        $this->assertGreaterThan(count($teams[1]->get_all_players_ids()), 0);
        $this->assertGreaterThan(count($teams[1]->get_all_leagues_ids()), 0);
    }
}<commit_msg>Add test for teams_mapper_web<commit_after><?php

class teams_mapper_webTest extends PHPUnit_Framework_TestCase
{
    /**
     * @var teams_mapper_web
     */
    protected $mapper;

    protected function setUp() {
        $this->mapper = new teams_mapper_web();
    }

    public function testLoad() {

        $this->mapper->set_team_id(36)->set_teams_requested(1);
        $teams = $this->mapper->load();

        $this->assertEquals(count($teams), 1);
        $this->assertEquals($teams[36]->get('team_id'), 36);
        $this->assertEquals($teams[36]->get('name'), '<NAME>');
        $this->assertEquals($teams[36]->get('tag'), 'Na`Vi');
        $this->assertEquals($teams[36]->get('country_code'), 'ua');
        $this->assertGreaterThan(count($teams[36]->get_all_players_ids()), 0);
        $this->assertGreaterThan(count($teams[36]->get_all_leagues_ids()), 0);
    }

    public function testLoadMultiple() {

        $this->mapper->set_team_id(36)->set_teams_requested(2);
        $teams = $this->mapper->load();
        $this->assertEquals(count($teams), 2);

        $this->assertEquals($teams[36]->get('team_id'), 36);
        $this->assertEquals($teams[36]->get('name'), '<NAME>');
        $this->assertEquals($teams[36]->get('tag'), 'Na`Vi');
        $this->assertEquals($teams[36]->get('country_code'), 'ua');
        $this->assertGreaterThan(count($teams[36]->get_all_players_ids()), 0);
        $this->assertGreaterThan(count($teams[36]->get_all_leagues_ids()), 0);

        $this->assertEquals($teams[39]->get('team_id'), 39);
        $this->assertEquals($teams[39]->get('name'), '<NAME>');
        $this->assertEquals($teams[39]->get('tag'), 'EG');
        $this->assertEquals($teams[39]->get('country_code'), 'us');
        $this->assertGreaterThan(count($teams[39]->get_all_players_ids()), 0);
        $this->assertGreaterThan(count($teams[39]->get_all_leagues_ids()), 0);
    }
}
{'fraction_non_alphanumeric': 0.21909814323607427, 'fraction_numerical': 0.02493368700265252, 'mean_word_length': 3.91015625, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 107, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6811640', 'n_tokens_mistral': 1325, 'n_tokens_neox': 1257, 'n_words': 137}