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

createForExpectedConfigurationArrayOfStringValue() public static method

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)));
    }

Usage Example

 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());
 }
All Usage Examples Of Nelmio\Alice\Throwable\Exception\InvalidArgumentExceptionFactory::createForExpectedConfigurationArrayOfStringValue