public function DefinitionTest::testSetIsAbstract

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

File

drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php, line 183

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