UserTest.php 591 B

1234567891011121314151617181920212223
  1. <?php
  2. /**
  3. * User test class
  4. *
  5. * @author Christopher Han <xiphux@gmail.com>
  6. * @copyright Copyright (c) 2012 Christopher Han
  7. * @package GitPHP
  8. * @subpackage Test\Auth
  9. */
  10. class GitPHP_UserTest extends PHPUnit_Framework_TestCase
  11. {
  12. public function testUser()
  13. {
  14. $user = new GitPHP_User('user','pass');
  15. $this->assertEquals('user', $user->GetUsername());
  16. $this->assertEquals('pass', $user->GetPassword());
  17. $user->SetUsername('user2');
  18. $this->assertEquals('user2', $user->GetUsername());
  19. $user->SetPassword('pass2');
  20. $this->assertEquals('pass2', $user->GetPassword());
  21. }
  22. }