You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* 2.7:
Fix locale and written standard inconsistencies for Norwegian translations
[Form] [Validator] Fix locale inconsistencies in Norwegian translations
fixed CS
[DependencyInjection] fixed exceptions thrown by get method of ContainerBuilder
[Form] remove useless code in ResizeFormListener
@@ -51,9 +53,9 @@ public function testDefinitions()
51
53
52
54
try {
53
55
$builder->getDefinition('baz');
54
-
$this->fail('->getDefinition() throws an InvalidArgumentException if the service definition does not exist');
55
-
} catch (\InvalidArgumentException$e) {
56
-
$this->assertEquals('The service definition "baz" does not exist.', $e->getMessage(), '->getDefinition() throws an InvalidArgumentException if the service definition does not exist');
56
+
$this->fail('->getDefinition() throws a ServiceNotFoundException if the service definition does not exist');
57
+
} catch (ServiceNotFoundException$e) {
58
+
$this->assertEquals('You have requested a non-existent service "baz".', $e->getMessage(), '->getDefinition() throws a ServiceNotFoundException if the service definition does not exist');
57
59
}
58
60
}
59
61
@@ -102,9 +104,9 @@ public function testGet()
102
104
$builder = newContainerBuilder();
103
105
try {
104
106
$builder->get('foo');
105
-
$this->fail('->get() throws an InvalidArgumentException if the service does not exist');
106
-
} catch (\InvalidArgumentException$e) {
107
-
$this->assertEquals('The service definition "foo" does not exist.', $e->getMessage(), '->get() throws an InvalidArgumentException if the service does not exist');
107
+
$this->fail('->get() throws a ServiceNotFoundException if the service does not exist');
108
+
} catch (ServiceNotFoundException$e) {
109
+
$this->assertEquals('You have requested a non-existent service "foo".', $e->getMessage(), '->get() throws a ServiceNotFoundException if the service does not exist');
108
110
}
109
111
110
112
$this->assertNull($builder->get('foo', ContainerInterface::NULL_ON_INVALID_REFERENCE), '->get() returns null if the service does not exist and NULL_ON_INVALID_REFERENCE is passed as a second argument');
0 commit comments