Skip to content

Commit a0ce708

Browse files
committed
Fix quotes in exception messages
1 parent 9ef4e48 commit a0ce708

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

Routing/Router.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ private function resolve($value)
159159
return (string) $this->resolve($resolved);
160160
}
161161

162-
throw new RuntimeException(sprintf('The container parameter "%s", used in the route configuration value "%s", must be a string or numeric, but it is of type %s.', $match[1], $value, \gettype($resolved)));
162+
throw new RuntimeException(sprintf('The container parameter "%s", used in the route configuration value "%s", must be a string or numeric, but it is of type "%s".', $match[1], $value, \gettype($resolved)));
163163
}, $value);
164164

165165
return str_replace('%%', '%', $escapedValue);

Test/KernelTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ protected static function getKernelClass()
125125
if (isset($_SERVER['KERNEL_CLASS']) || isset($_ENV['KERNEL_CLASS'])) {
126126
$class = isset($_ENV['KERNEL_CLASS']) ? $_ENV['KERNEL_CLASS'] : $_SERVER['KERNEL_CLASS'];
127127
if (!class_exists($class)) {
128-
throw new \RuntimeException(sprintf('Class "%s" doesn\'t exist or cannot be autoloaded. Check that the KERNEL_CLASS value in phpunit.xml matches the fully-qualified class name of your Kernel or override the %s::createKernel() method.', $class, static::class));
128+
throw new \RuntimeException(sprintf('Class "%s" doesn\'t exist or cannot be autoloaded. Check that the KERNEL_CLASS value in phpunit.xml matches the fully-qualified class name of your Kernel or override the "%s::createKernel()" method.', $class, static::class));
129129
}
130130

131131
return $class;

Tests/Controller/AbstractControllerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ public function setContainer(ContainerInterface $container)
4646
continue;
4747
}
4848
if (!isset($expected[$id])) {
49-
throw new \UnexpectedValueException(sprintf('Service "%s" is not expected, as declared by %s::getSubscribedServices()', $id, AbstractController::class));
49+
throw new \UnexpectedValueException(sprintf('Service "%s" is not expected, as declared by "%s::getSubscribedServices()".', $id, AbstractController::class));
5050
}
5151
$type = substr($expected[$id], 1);
5252
if (!$container->get($id) instanceof $type) {
53-
throw new \UnexpectedValueException(sprintf('Service "%s" is expected to be an instance of "%s", as declared by %s::getSubscribedServices()', $id, $type, AbstractController::class));
53+
throw new \UnexpectedValueException(sprintf('Service "%s" is expected to be an instance of "%s", as declared by "%s::getSubscribedServices()".', $id, $type, AbstractController::class));
5454
}
5555
}
5656

Tests/Routing/RouterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ public function testExceptionOnNonExistentParameter()
200200
public function testExceptionOnNonStringParameter()
201201
{
202202
$this->expectException('Symfony\Component\DependencyInjection\Exception\RuntimeException');
203-
$this->expectExceptionMessage('The container parameter "object", used in the route configuration value "/%object%", must be a string or numeric, but it is of type object.');
203+
$this->expectExceptionMessage('The container parameter "object", used in the route configuration value "/%object%", must be a string or numeric, but it is of type "object".');
204204
$routes = new RouteCollection();
205205

206206
$routes->add('foo', new Route('/%object%'));

0 commit comments

Comments
 (0)