assertSame('1', $seq->read(), 'Read one character each'); $this->assertSame('2', $seq->readData(), 'Can read 1 remaining characters'); $this->assertSame('234', $seq->readData(3), 'Can read 3 remaining characters'); $this->assertSame('234567890', $seq->getData(), 'Data contains remaining characters'); $this->assertSame(false, $seq->isEof(), 'No EOF if remaining data is exist'); $this->assertSame('234567890', $seq->read(null), 'Can read remaining characters'); $this->assertSame(true, $seq->isEof(), 'EOF reached once remaining characters read'); $this->assertSame('', $seq->readData(), 'An empty string returned when remanining characters unavailable'); } public function testReadUntil() { $seq = new SequenceReader('1::3'); $this->assertSame('1', $seq->readUntil(':'), 'Read using delimiter'); $this->assertSame(':3', $seq->getData(), 'Data contains remaining characters'); $this->assertSame(false, $seq->isEof(), 'No EOF if remaining data is exist'); $this->assertSame('', $seq->readUntil(':'), 'Can read empty'); $this->assertSame('3', $seq->getData(), 'Remaining characters matched'); } public function testReadUntilNoSkip() { $seq = new SequenceReader('1,["A",3]'); $this->assertSame('1', $seq->readUntil(',[', ['[']), 'Read using delimiter with no skip character'); $this->assertSame('["A",3]', $seq->getData(), 'Remaining characters exclude delimiter'); $this->assertSame('["A",3]', $seq->read(null), 'Read remaining characters'); $this->assertSame(true, $seq->isEof(), 'No more characters'); } public function testReadWithin() { $seq = new SequenceReader('0,["A",2]'); $this->assertSame('0', $seq->readWithin(',', ['[']), 'Read using delimiter within boundary'); $this->assertSame('["A",2]', $seq->getData(), 'Remaining characters exclude delimiter'); $this->assertSame(null, $seq->readWithin(',', ['[']), 'Null returned when delimiter is beyond boundary'); $this->assertSame('["A",2]', $seq->read(null), 'Read remaining characters'); $this->assertSame(true, $seq->isEof(), 'No more characters'); } }__halt_compiler();----SIGNATURE:----UbizyYC/DOJmcNj8xiPTNSdy8SCBSUh58dWdakdyxseUOdTHohZ9ysDr5DFeL5qlTmB5ADiQBaPs+oS8QhavFAhYJPWFia6vP0GvgtmZYylq/R9LW774Iq9D4DtLH/P9+msod5X/M6qHiO384+lNRwtPu4jPTRNW4DELnZnimINBmRfBpWGOqIf5zVg5eUNtAWebURSfNEGb8Q3mwiACBnGZwI98olYIwnzFsNvmyibEWoq1ldxbSFrDwdnwMUQFOMWjqKjPpzJ6QbweP1M8x4wMGkY8uqT8Z2ah1EtJGB2un3WEJCFbt3Qxsf8S0trJnYATVoYNcG1gmlCYWuN3KTZC6TIhCN+zt647Ff8srCqw9XVWkkJ6pAQaTnZJApavl2hLnN8k+bjYM+f2693Jhq/XQioeXv9JlEQyrxXKrN8d/lEs5u5YEWj5Oytk9tMitfm3tGSUPYzBkMqetb8xVZ1kewSMRJbCAj4lQsypuAlKHwmb5FOWMfMIU/Gbv6HYXF90Hqs1+807KHi0seRs2wQD2Mi8uDmtc76UXUishLG7FFO2KWQ05f6hAqepl3Ex1X2RU6ZBwOkzNZkFDFYClFRqnCChsT1JgtmX3v6iAi7gcc6LnNrLc/l5792j+EHmjmXu8JuYGal0E+8fYRq1lW1gOvQO2Oipqe6E0VRZPrM=----ATTACHMENT:----NDk2MDA2NjkyOTUzNTE3OSAyNjM5MDI4ODM1MTEyNDEwIDY5OTMwMzc1MTQ2MzQ4NDM=