You are here

public function DefinitionTest::testSetIsAbstract in Zircon Profile 8

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

@covers Symfony\Component\DependencyInjection\Definition::setAbstract @covers Symfony\Component\DependencyInjection\Definition::isAbstract

File

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

Class

DefinitionTest

Namespace

Symfony\Component\DependencyInjection\Tests

Code

public function testSetIsAbstract() {
  $def = new Definition('stdClass');
  $this
    ->assertFalse($def
    ->isAbstract(), '->isAbstract() returns false by default');
  $this
    ->assertSame($def, $def
    ->setAbstract(true), '->setAbstract() implements a fluent interface');
  $this
    ->assertTrue($def
    ->isAbstract(), '->isAbstract() returns true if the instance must not be public.');
}