public static createForExpectedConfigurationArrayOfStringValue ( $value ) : InvalidArgumentException | ||
return | InvalidArgumentException |
public static function createForExpectedConfigurationArrayOfStringValue($value) : \InvalidArgumentException
{
return new \InvalidArgumentException(sprintf('Expected an array of strings but got "%s" element in the array instead.', gettype($value)));
}
public function testTestCreateForExpectedConfigurationArrayOfStringValue() { $exception = InvalidArgumentExceptionFactory::createForExpectedConfigurationArrayOfStringValue(10); $this->assertEquals('Expected an array of strings but got "integer" element in the array instead.', $exception->getMessage()); $this->assertEquals(0, $exception->getCode()); $this->assertNull($exception->getPrevious()); }