You are here

public function DefinitionTest::testSetIsPublic in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/dependency-injection/Tests/DefinitionTest.php \Symfony\Component\DependencyInjection\Tests\DefinitionTest::testSetIsPublic()

@covers Symfony\Component\DependencyInjection\Definition::setPublic @covers Symfony\Component\DependencyInjection\Definition::isPublic

File

vendor/symfony/dependency-injection/Tests/DefinitionTest.php, line 146

Class

DefinitionTest

Namespace

Symfony\Component\DependencyInjection\Tests

Code

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.');
}