コード例 #1
0
 /**
  * @param Range $range
  * @param int $total
  * @return RangeFile
  */
 protected function createFileFromRangeAndTotal(Range $range, $total)
 {
     return PHPRangeFile::fromRangeAndTotal($this->basePath, $range, $total);
 }
コード例 #2
0
 private function givenFileUnserializesTo(PHPRangeFile $file, array $characters)
 {
     $values = [];
     foreach ($characters as $i => $character) {
         $serialized = sprintf('serialized:%d', $i);
         $values[$i] = $serialized;
         $this->serializer->unserialize($serialized)->willReturn($character);
     }
     $file->read()->willReturn($values);
 }