コード例 #1
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'));
     // test sync token
     $this->dbHandler->setServerStatus('http://server1', TrustedServers::STATUS_OK, 'token1234567890');
     $servers = $this->dbHandler->getAllServer();
     $this->assertSame('token1234567890', $servers[0]['sync_token']);
 }
コード例 #2
0
ファイル: dbhandlertest.php プロジェクト: evanjt/core
 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'));
 }