<commit_before><?php
use Kafoso\SvnNumber\SvnAction\Status;

class StatusTest extends \PHPUnit_Framework_TestCase {
    public function testRunsSvnStatusOnConstruction(){
        $status = new Status($this->getSvnNumberMock());
        $expected = array(
            "A    foo/bar.txt",
            "D    foo/baz.txt",
        );
        $this->assertSame($expected, $status->getSvnStatus());
    }

    public function testThatOutputIsAsExpected(){
        $status = new Status($this->getSvnNumberMock());
        $expectedArray = array(
            "\33[1m\33[38;5;231m    1  \33[1m\33[38;5;40mA\33[38;5;253m    \33[0m\33[38;5;40mfoo/bar.txt         \33[0m",
            "\33[1m\33[48;5;234m\33[38;5;231m    2  \33[1m\33[48;5;234m\33[38;5;160mD\33[48;5;234m\33[38;5;253m    \33[0m\33[48;5;234m\33[38;5;160mfoo/baz.txt         \33[0m",
        );
        $expected = trim(implode(PHP_EOL, $expectedArray));
        $this->assertSame(
            str_replace("\33", "@", $expected), // To make it readable in terminal
            str_replace("\33", "@", trim($status->getOutput(array(1,2))))
        );
        $this->assertSame($expected, trim($status->getOutput(array(1,2))));
    }

    public function testThatGetLinesReturnsAndArrayOfObjects(){
        $status = new Status($this->getSvnNumberMock());<commit_msg>Added additional test for a finite number of files<commit_after><?php
use Kafoso\SvnNumber\SvnAction\Status;

class StatusTest extends \PHPUnit_Framework_TestCase {
    public function testRunsSvnStatusOnConstruction(){
        $status = new Status($this->getSvnNumberMock());
        $expected = array(
            "A    foo/bar.txt",
            "D    foo/baz.txt",
        );
        $this->assertSame($expected, $status->getSvnStatus());
    }

    public function testThatOutputIsAsExpectedForAll(){
        $status = new Status($this->getSvnNumberMock());
        $expectedArray = array(
            "\33[1m\33[38;5;231m    1  \33[1m\33[38;5;40mA\33[38;5;253m    \33[0m\33[38;5;40mfoo/bar.txt         \33[0m",
            "\33[1m\33[48;5;234m\33[38;5;231m    2  \33[1m\33[48;5;234m\33[38;5;160mD\33[48;5;234m\33[38;5;253m    \33[0m\33[48;5;234m\33[38;5;160mfoo/baz.txt         \33[0m",
        );
        $expected = trim(implode(PHP_EOL, $expectedArray));
        $this->assertSame(
            str_replace("\33", "@", $expected), // To make it readable in terminal
            str_replace("\33", "@", trim($status->getOutput()))
        );
        $this->assertSame($expected, trim($status->getOutput()));
    }

    public function testThatOutputIsAsExpectedForAFiniteNumberOfFiles(){
        $status = new Status($this->getSvnNumberMock());
        $expectedArray = array(
            "\33[1m\33[38;5;231m    1  \33[1m\33[38;5;40mA\33[38;5;253m    \33[0m\33[38;5;40mfoo/bar.txt         \33[0m",
        );
        $expected = trim(implode(PHP_EOL, $expectedArray));
        $this->assertSame(
            str_replace("\33", "@", $expected), // To make it readable in terminal
            str_replace("\33", "@", trim($status->getOutput(array(1))))
        );
        $this->assertSame($expected, trim($status->getOutput(array(1))));
    }

    public function testThatGetLinesReturnsAndArrayOfObjects(){
        $status = new Status($this->getSvnNumberMock());
{'fraction_non_alphanumeric': 0.17001216545012166, 'fraction_numerical': 0.09154501216545012, 'mean_word_length': 2.7545662100456623, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 26, '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': '2768101', 'n_tokens_mistral': 1285, 'n_tokens_neox': 1139, 'n_words': 158}