Example #1
0
 /**
  * @dataProvider providesAuth
  */
 public function testAuth($expectedResult, $user, $password)
 {
     if ($expectedResult) {
         $this->dbHandler->addServer('url1');
         $this->dbHandler->addSharedSecret('url1', $password);
     }
     $result = $this->dbHandler->auth($user, $password);
     $this->assertEquals($expectedResult, $result);
 }
Example #2
0
 /**
  * Validates a username and password
  *
  * This method should return true or false depending on if login
  * succeeded.
  *
  * @param string $username
  * @param string $password
  * @return bool
  */
 protected function validateUserPass($username, $password)
 {
     return $this->db->auth($username, $password);
 }