|
|
@ -78,27 +78,34 @@ class UserTest extends CIDatabaseTestCase |
|
|
|
]); |
|
|
|
]); |
|
|
|
$this->assertEquals(lang('Aauth.infoUpdateSuccess'), $this->library->getInfosArray()[0]); |
|
|
|
$this->assertEquals(lang('Aauth.infoUpdateSuccess'), $this->library->getInfosArray()[0]); |
|
|
|
|
|
|
|
|
|
|
|
// moved to UserModelTest, not working here :/ |
|
|
|
$this->library = new Aauth(null, true); |
|
|
|
// $this->assertFalse($this->library->updateUser(2, 'admin@example.com', null, null)); |
|
|
|
$this->assertFalse($this->library->updateUser(2, 'admin@example.com', null, null)); |
|
|
|
// $this->assertEquals(lang('Aauth.existsAlreadyEmail'), $this->library->getErrorsArray()[0]); |
|
|
|
print_r(getErrorsArray()); |
|
|
|
|
|
|
|
$this->assertEquals(lang('Aauth.existsAlreadyEmail'), $this->library->getErrorsArray()[0]); |
|
|
|
|
|
|
|
|
|
|
|
// $this->assertFalse($this->library->updateUser(2, 'adminexample.com', null, null)); |
|
|
|
$this->library = new Aauth(null, true); |
|
|
|
// $this->assertEquals(lang('Aauth.invalidEmail'), $this->library->getErrorsArray()[0]); |
|
|
|
$this->assertFalse($this->library->updateUser(2, 'adminexample.com', null, null)); |
|
|
|
|
|
|
|
$this->assertEquals(lang('Aauth.invalidEmail'), $this->library->getErrorsArray()[0]); |
|
|
|
|
|
|
|
|
|
|
|
// $this->assertFalse($this->library->updateUser(2, null, 'pass', null)); |
|
|
|
$this->library = new Aauth(null, true); |
|
|
|
// $this->assertEquals(lang('Aauth.invalidPassword'), $this->library->getErrorsArray()[0]); |
|
|
|
$this->assertFalse($this->library->updateUser(2, null, 'pass', null)); |
|
|
|
|
|
|
|
$this->assertEquals(lang('Aauth.invalidPassword'), $this->library->getErrorsArray()[0]); |
|
|
|
|
|
|
|
|
|
|
|
// $this->assertFalse($this->library->updateUser(2, null, 'password12345678901011121314151617', null)); |
|
|
|
$this->library = new Aauth(null, true); |
|
|
|
// $this->assertEquals(lang('Aauth.invalidPassword'), $this->library->getErrorsArray()[0]); |
|
|
|
$this->assertFalse($this->library->updateUser(2, null, 'password12345678901011121314151617', null)); |
|
|
|
|
|
|
|
$this->assertEquals(lang('Aauth.invalidPassword'), $this->library->getErrorsArray()[0]); |
|
|
|
|
|
|
|
|
|
|
|
// $this->assertFalse($this->library->updateUser(2, null, null, 'admin')); |
|
|
|
$this->library = new Aauth(null, true); |
|
|
|
// $this->assertEquals(lang('Aauth.existsAlreadyUsername'), $this->library->getErrorsArray()[0]); |
|
|
|
$this->assertFalse($this->library->updateUser(2, null, null, 'admin')); |
|
|
|
|
|
|
|
$this->assertEquals(lang('Aauth.existsAlreadyUsername'), $this->library->getErrorsArray()[0]); |
|
|
|
|
|
|
|
|
|
|
|
// $this->assertFalse($this->library->updateUser(2, null, null, 'user+')); |
|
|
|
$this->library = new Aauth(null, true); |
|
|
|
// $this->assertEquals(lang('Aauth.invalidUsername'), $this->library->getErrorsArray()[0]); |
|
|
|
$this->assertFalse($this->library->updateUser(2, null, null, 'user+')); |
|
|
|
|
|
|
|
$this->assertEquals(lang('Aauth.invalidUsername'), $this->library->getErrorsArray()[0]); |
|
|
|
|
|
|
|
|
|
|
|
// $this->assertFalse($this->library->updateUser(2)); |
|
|
|
$this->library = new Aauth(null, true); |
|
|
|
// $this->assertCount(0, $this->library->getErrorsArray()); |
|
|
|
$this->assertFalse($this->library->updateUser(2)); |
|
|
|
|
|
|
|
$this->assertCount(0, $this->library->getErrorsArray()); |
|
|
|
|
|
|
|
|
|
|
|
$this->library = new Aauth(null, true); |
|
|
|
$this->library = new Aauth(null, true); |
|
|
|
$this->assertFalse($this->library->updateUser(99)); |
|
|
|
$this->assertFalse($this->library->updateUser(99)); |
|
|
|