<commit_before><commit_msg>adding tests for the CheckSet<commit_after><?php

namespace Psecio\Validation;

class CheckSetTest extends \PHPUnit_Framework_TestCase
{
    /**
     * Test the looping of the set via a foreach
     */
    public function testForeachValid()
    {
        $checks = [
            new \Psecio\Validation\Check\Integer(),
            new \Psecio\Validation\Check\Numeric()
        ];
        $set = new CheckSet($checks);
        foreach ($set as $index => $check) {
            $this->assertEquals($checks[$index], $check);
        }
    }

    /**
     * Test accessing the checks in the set as an array
     */
    public function testArrayAccessValid()
    {
        $checks = [
            new \Psecio\Validation\Check\Integer(),
            new \Psecio\Validation\Check\Numeric()
        ];
        $set = new CheckSet($checks);

        $this->assertEquals($checks[0], $set[0]);
    }

}
{'fraction_non_alphanumeric': 0.12527233115468409, 'fraction_numerical': 0.002178649237472767, 'mean_word_length': 2.0942760942760943, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 6, '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': '1840914', 'n_tokens_mistral': 271, 'n_tokens_neox': 262, 'n_words': 61}