public function testRepeatAccessor() { $this->assertNull($this->instance->getRepeat()); $this->assertSame($this->instance, $this->instance->setRepeat('10')); $this->assertSame(10, $this->instance->getRepeat()); $this->setExpectedException(LogicException::class); $this->instance->setRepeat(-1); }
public function testcheckExecutions() { $config = new LoopConfig(); $event = new LoopEvent($this->getMock(LoopInterface::class), $config); $config->setRepeat(10); $this->assertNull($this->instance->checkExecutions($event)); $this->assertAttributeEquals(1, 'executions', $this->instance); $this->setExpectedException(LoopException::class); $config->setRepeat(1); $this->instance->checkExecutions($event); }