public static createForExpectedConfigurationStringValue ( $value ) : InvalidArgumentException | ||
리턴 | InvalidArgumentException |
public function testTestCreateForExpectedConfigurationStringValue() { $exception = InvalidArgumentExceptionFactory::createForExpectedConfigurationStringValue(10); $this->assertEquals('Expected a string value but got "integer" instead.', $exception->getMessage()); $this->assertEquals(0, $exception->getCode()); $this->assertNull($exception->getPrevious()); }
private function createStringValidatorClosure() : \Closure { return function ($value) { if (is_string($value)) { return $value; } throw InvalidArgumentExceptionFactory::createForExpectedConfigurationStringValue($value); }; }