public static function createForValue(ValueInterface $value) : ResolverNotFoundException { return new ResolverNotFoundException(sprintf('No resolver found to resolve value "%s".', $value)); }
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()); }