/**
  * Put the recorder in playing state.
  * The generator will cyclicly return the recorded numbers
  *
  * @return NumberGeneratorRecorder The current instance
  */
 public function play()
 {
     $this->state = static::STATE_PLAYING;
     $this->currentGenerator = $this->playingGenerator;
     $this->playingGenerator->setSequence($this->getRecording());
     return $this;
 }
 public function testRandMaxReturnsSequenceMax()
 {
     $generator = new CyclicNumberGenerator(array(4, 76, 4));
     $this->assertEquals(76, $generator->randMax());
 }