public function DefinitionTest::testSetIsPublic in Service Container 7.2
Same name and namespace in other branches
- 7 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php \Symfony\Component\DependencyInjection\Tests\DefinitionTest::testSetIsPublic()
@covers Symfony\Component\DependencyInjection\Definition::setPublic @covers Symfony\Component\DependencyInjection\Definition::isPublic
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Tests/ DefinitionTest.php, line 146
Class
Namespace
Symfony\Component\DependencyInjection\TestsCode
public function testSetIsPublic() {
$def = new Definition('stdClass');
$this
->assertTrue($def
->isPublic(), '->isPublic() returns true by default');
$this
->assertSame($def, $def
->setPublic(false), '->setPublic() implements a fluent interface');
$this
->assertFalse($def
->isPublic(), '->isPublic() returns false if the instance must not be public.');
}