function testRegisterWithConstructor() { $this->app->register('reg2', 'User', array('Bob')); $user = $this->app->reg2(); $this->assertTrue(is_object($user)); $this->assertEquals('User', get_class($user)); $this->assertEquals('Bob', $user->name); }