JBZoo\PHPUnit\StringTest::testParseLines PHP Method

testParseLines() public method

public testParseLines ( )
    public function testParseLines()
    {
        isSame(array('asd'), Str::parseLines('asd', false));
        isSame(array('asd' => 'asd'), Str::parseLines('asd', true));
        isSame(array('asd' => 'asd'), Str::parseLines('asd'));
        $lines = array('', false, 123, 456, ' 123   ', '      ', 'ASD', '0');
        isSame(array('123' => '123', '456' => '456', 'ASD' => 'ASD', '0' => '0'), Str::parseLines(implode("\r", $lines), true));
        isSame(array('123' => '123', '456' => '456', 'ASD' => 'ASD', '0' => '0'), Str::parseLines(implode("\n", $lines), true));
        isSame(array('123', '456', '123', 'ASD', '0'), Str::parseLines(implode("\r\n", $lines), false));
    }