createForInvalidLimitValueForRecursiveCalls() 공개 정적인 메소드

public static createForInvalidLimitValueForRecursiveCalls ( integer $limit ) : InvalidArgumentException
$limit integer
리턴 InvalidArgumentException
예제 #1
0
 public function __construct(ChainableParameterResolverInterface $resolver, int $limit = 5)
 {
     $this->resolver = $resolver;
     if (2 >= $limit) {
         throw InvalidArgumentExceptionFactory::createForInvalidLimitValueForRecursiveCalls($limit);
     }
     $this->limit = $limit;
 }
 public function testTestCreateForInvalidLimitValueForRecursiveCalls()
 {
     $exception = InvalidArgumentExceptionFactory::createForInvalidLimitValueForRecursiveCalls(10);
     $this->assertEquals('Expected limit for recursive calls to be of at least 2. Got "10" instead.', $exception->getMessage());
     $this->assertEquals(0, $exception->getCode());
     $this->assertNull($exception->getPrevious());
 }