You are here

public function DefinitionTest::testSetGetClass in Service Container 7

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

@covers Symfony\Component\DependencyInjection\Definition::setClass @covers Symfony\Component\DependencyInjection\Definition::getClass

File

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

Class

DefinitionTest

Namespace

Symfony\Component\DependencyInjection\Tests

Code

public function testSetGetClass() {
  $def = new Definition('stdClass');
  $this
    ->assertSame($def, $def
    ->setClass('foo'), '->setClass() implements a fluent interface');
  $this
    ->assertEquals('foo', $def
    ->getClass(), '->getClass() returns the class name');
}