예제 #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);
 }
예제 #2
0
 public function testGetServerStatus()
 {
     $this->dbHandler->addServer('server1');
     $this->dbHandler->setServerStatus('http://server1', TrustedServers::STATUS_OK);
     $this->assertSame(TrustedServers::STATUS_OK, $this->dbHandler->getServerStatus('https://server1'));
 }