Skip to content

Commit

Permalink
adjust tests
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur Schiwon <[email protected]>
  • Loading branch information
blizzz committed Nov 29, 2019
1 parent 9d3b107 commit ca5d9ac
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions apps/user_ldap/tests/User_LDAPTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -558,8 +558,8 @@ public function testUserExistsForDeleted() {
->method('get')
->willReturn($user);

//test for deleted user
$this->assertFalse($backend->userExists('formerUser'));
//test for deleted user – always returns true as long as we have the user in DB
$this->assertTrue($backend->userExists('formerUser'));
}

public function testUserExistsForNeverExisting() {
Expand Down Expand Up @@ -646,8 +646,8 @@ public function testUserExistsPublicAPIForDeleted() {
->method('get')
->willReturn($user);

//test for deleted user
$this->assertFalse(\OC::$server->getUserManager()->userExists('formerUser'));
//test for deleted user – always returns true as long as we have the user in DB
$this->assertTrue(\OC::$server->getUserManager()->userExists('formerUser'));
}

public function testUserExistsPublicAPIForNeverExisting() {
Expand Down Expand Up @@ -777,7 +777,7 @@ public function testGetHomeRelative() {
$this->assertEquals($dataDir.'/susannah/', $result);
}


public function testGetHomeNoPath() {
$this->expectException(\Exception::class);

Expand Down Expand Up @@ -1101,7 +1101,7 @@ public function testCountUsersWithPlugin() {
->willReturn(42);

$this->assertEquals($this->backend->countUsers(),42);
}
}

public function testLoginName2UserNameSuccess() {
$loginName = 'Alice';
Expand Down Expand Up @@ -1269,7 +1269,7 @@ private function prepareAccessForSetPassword($enablePasswordChange = true) {
}));
}


public function testSetPasswordInvalid() {
$this->expectException(\OC\HintException::class);
$this->expectExceptionMessage('Password fails quality checking policy');
Expand All @@ -1283,7 +1283,7 @@ public function testSetPasswordInvalid() {

$this->assertTrue(\OC_User::setPassword('roland', 'dt'));
}

public function testSetPasswordValid() {
$this->prepareAccessForSetPassword($this->access);

Expand Down Expand Up @@ -1313,7 +1313,7 @@ public function testSetPasswordValidDisabled() {
$this->assertFalse(\OC_User::setPassword('roland', 'dt12234$'));
}


public function testSetPasswordWithInvalidUser() {
$this->expectException(\Exception::class);
$this->expectExceptionMessage('LDAP setPassword: Could not get user object for uid NotExistingUser. Maybe the LDAP entry has no set display name attribute?');
Expand Down Expand Up @@ -1414,7 +1414,7 @@ public function testSetDisplayNameWithPlugin() {
$this->assertEquals($newDisplayName, $this->backend->setDisplayName('uid', $newDisplayName));
}


public function testSetDisplayNameErrorWithPlugin() {
$this->expectException(\OC\HintException::class);

Expand Down

0 comments on commit ca5d9ac

Please sign in to comment.