diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2016-04-29 09:23:36 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2016-05-02 10:44:09 +0200 |
commit | 3397e27657f67ed68ae506ced5759e73e26a9188 (patch) | |
tree | eaacaccd1e86c1773bc76fb7aaf2ab2f658ce191 /tests | |
parent | 6b12f96b14ef4c560ae9be436caf2619739d74ae (diff) | |
download | nextcloud-server-3397e27657f67ed68ae506ced5759e73e26a9188.tar.gz nextcloud-server-3397e27657f67ed68ae506ced5759e73e26a9188.zip |
Remove the password from the validateUserPass() method as well
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/logger.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/lib/logger.php b/tests/lib/logger.php index 9c9cd9e6728..e6a0abfbf28 100644 --- a/tests/lib/logger.php +++ b/tests/lib/logger.php @@ -107,4 +107,19 @@ class Logger extends TestCase { $this->assertContains('checkPassword(*** username and password replaced ***)', $logLine); } } + + /** + * @dataProvider userAndPasswordData + */ + public function testDetectvalidateUserPass($user, $password) { + $e = new \Exception('test'); + $this->logger->logException($e); + $logLines = $this->getLogs(); + + foreach($logLines as $logLine) { + $this->assertNotContains($user, $logLine); + $this->assertNotContains($password, $logLine); + $this->assertContains('validateUserPass(*** username and password replaced ***)', $logLine); + } + } } |