You are here

public function DefinitionTest::testSetGetScope in Service Container 7.2

Same name and namespace in other branches
  1. 7 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php \Symfony\Component\DependencyInjection\Tests\DefinitionTest::testSetGetScope()

@covers Symfony\Component\DependencyInjection\Definition::setScope @covers Symfony\Component\DependencyInjection\Definition::getScope

File

modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php, line 134

Class

DefinitionTest

Namespace

Symfony\Component\DependencyInjection\Tests

Code

public function testSetGetScope() {
  $def = new Definition('stdClass');
  $this
    ->assertEquals('container', $def
    ->getScope());
  $this
    ->assertSame($def, $def
    ->setScope('foo'));
  $this
    ->assertEquals('foo', $def
    ->getScope());
}