public static createForExpectedConfigurationPositiveIntegerValue ( integer $value ) : InvalidArgumentException | ||
$value | integer | |
Résultat | InvalidArgumentException |
public static function createForExpectedConfigurationPositiveIntegerValue(int $value) : \InvalidArgumentException
{
return new \InvalidArgumentException(sprintf('Expected a strictly positive integer but got "%s" instead.', $value));
}
public function testTestCreateForExpectedConfigurationPositiveIntegerValue() { $exception = InvalidArgumentExceptionFactory::createForExpectedConfigurationPositiveIntegerValue(-1); $this->assertEquals('Expected a strictly positive integer but got "-1" instead.', $exception->getMessage()); $this->assertEquals(0, $exception->getCode()); $this->assertNull($exception->getPrevious()); }