You are here

public function DefinitionTest::testConstructor in Zircon Profile 8.0

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

@covers Symfony\Component\DependencyInjection\Definition::__construct

File

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

Class

DefinitionTest

Namespace

Symfony\Component\DependencyInjection\Tests

Code

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