]> source.dussan.org Git - nextcloud-server.git/commitdiff
add test 1015/head
authorArthur Schiwon <blizzz@arthur-schiwon.de>
Mon, 22 Aug 2016 14:56:00 +0000 (16:56 +0200)
committerArthur Schiwon <blizzz@arthur-schiwon.de>
Mon, 22 Aug 2016 14:56:00 +0000 (16:56 +0200)
tests/lib/LoggerTest.php

index 4b80c01f34369b7aa1e1396dcde300fcceed59da..abb9deebd556962ab8487a32e2882ff1726ed60e 100644 (file)
@@ -122,4 +122,20 @@ class LoggerTest extends TestCase {
                        $this->assertContains('validateUserPass(*** sensitive parameters replaced ***)', $logLine);
                }
        }
+
+       /**
+        * @dataProvider userAndPasswordData
+        */
+       public function testDetecttryLogin($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('tryLogin(*** sensitive parameters replaced ***)', $logLine);
+               }
+       }
+
 }