Skip to content

Commit a474d15

Browse files
committed
Add test testGetAfterSetNull()
1 parent 82ee78c commit a474d15

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,18 @@ public function testGet()
166166
$this->assertNull($sc->get('', ContainerInterface::NULL_ON_INVALID_REFERENCE));
167167
}
168168

169+
/**
170+
* @covers Symfony\Component\DependencyInjection\Container::get
171+
*/
172+
public function testGetAfterSetNull()
173+
{
174+
$sc = new ProjectServiceContainer();
175+
$this->assertNotNull($sc->get('bar'));
176+
177+
$sc->set('bar' , null);
178+
$this->assertNull($sc->get('bar'));
179+
}
180+
169181
public function testGetCircularReference()
170182
{
171183

0 commit comments

Comments
 (0)