Ejemplo n.º 1
0
 public function testGetMethods()
 {
     $definition = new ClassDefinition('Foo');
     $definition->addMethod("setVar", true);
     $this->assertEquals(array(), $definition->getMethods('Bar'));
     $this->assertEquals(array('setVar' => true), $definition->getMethods('Foo'));
 }
Ejemplo n.º 2
0
 public function testAddMethodSetsCorrectConstructorType()
 {
     $definition = new ClassDefinition('Foo');
     $definition->addMethod('__construct');
     $this->assertEquals(array('__construct' => Di::METHOD_IS_CONSTRUCTOR), $definition->getMethods('Foo'));
 }