src/Generator/MockGenerator.php
public function generate($byteCount)
    {
        $bytes = '';

        if (strlen(!$this->randomString)) {
            $this->randomString = chr(0);
        }

        do {
            $bytes .= $this->randomString;
        } while (strlen($bytes) < $byteCount);

        return substr($bytes, 0, $byteCount);
    }
public function generate($byteCount)
    {
        $bytes = '';

        if (strlen(!$this->randomString)) {
            $this->randomString = chr(0);
        }

        do {
            $bytes .= $this->randomString;
        } while (strlen($bytes) < $byteCount);

        return substr($bytes, 0, $byteCount);
    }
Generate a string of random data.

@param  integer $byteCount The desired number of bytes.
@return string  Returns the generated string.