Nelmio\Alice\Throwable\Exception\InvalidArgumentExceptionFactory::createForInvalidSeedConfigurationValue PHP Method

createForInvalidSeedConfigurationValue() public static method

public static createForInvalidSeedConfigurationValue ( integer | float | string $seed ) : InvalidArgumentException
$seed integer | float | string
return InvalidArgumentException
    public static function createForInvalidSeedConfigurationValue($seed) : \InvalidArgumentException
    {
        return new \InvalidArgumentException(sprintf('Expected value to be either null or a strictly positive integer but got "%s" ' . 'instead.', $seed));
    }

Usage Example

 public function testTestCreateForInvalidSeedConfigurationValue()
 {
     $exception = InvalidArgumentExceptionFactory::createForInvalidSeedConfigurationValue(10);
     $this->assertEquals('Expected value to be either null or a strictly positive integer but got "10" instead.', $exception->getMessage());
     $this->assertEquals(0, $exception->getCode());
     $this->assertNull($exception->getPrevious());
 }
All Usage Examples Of Nelmio\Alice\Throwable\Exception\InvalidArgumentExceptionFactory::createForInvalidSeedConfigurationValue