Nelmio\Alice\Throwable\Exception\InvalidArgumentExceptionFactory::createForExpectedConfigurationArrayOfStringValue PHP 메소드

createForExpectedConfigurationArrayOfStringValue() 공개 정적인 메소드

public static createForExpectedConfigurationArrayOfStringValue ( $value ) : InvalidArgumentException
리턴 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