public function testExceptionOnInvalidMaxIterations() { $processor = new Processor(new RegularParser(), new HandlerContainer()); $this->setExpectedException('InvalidArgumentException'); $processor->withMaxIterations(new \stdClass()); }