public function DefinitionTest::testConstructor in Service Container 7
Same name and namespace in other branches
- 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php \Symfony\Component\DependencyInjection\Tests\DefinitionTest::testConstructor()
@covers Symfony\Component\DependencyInjection\Definition::__construct
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Tests/ DefinitionTest.php, line 21
Class
Namespace
Symfony\Component\DependencyInjection\TestsCode
public function testConstructor() {
$def = new Definition('stdClass');
$this
->assertEquals('stdClass', $def
->getClass(), '__construct() takes the class name as its first argument');
$def = new Definition('stdClass', array(
'foo',
));
$this
->assertEquals(array(
'foo',
), $def
->getArguments(), '__construct() takes an optional array of arguments as its second argument');
}