Nelmio\Alice\Throwable\Exception\Generator\Resolver\ResolverNotFoundExceptionFactory::createForValue PHP Метод

createForValue() публичный статический Метод

public static createForValue ( Nelmio\Alice\Definition\ValueInterface $value ) : ResolverNotFoundException
$value Nelmio\Alice\Definition\ValueInterface
Результат ResolverNotFoundException
    public static function createForValue(ValueInterface $value) : ResolverNotFoundException
    {
        return new ResolverNotFoundException(sprintf('No resolver found to resolve value "%s".', $value));
    }

Usage Example

 public function testTestCreateNewExceptionWithFactoryForValue()
 {
     $exception = ResolverNotFoundExceptionFactory::createForValue(new DummyValue('dummy'));
     $this->assertEquals('No resolver found to resolve value "dummy".', $exception->getMessage());
     $this->assertEquals(0, $exception->getCode());
     $this->assertNull($exception->getPrevious());
 }
All Usage Examples Of Nelmio\Alice\Throwable\Exception\Generator\Resolver\ResolverNotFoundExceptionFactory::createForValue