gearman_client_013.phpt 652 B

123456789101112131415161718192021
  1. --TEST--
  2. GearmanClient::addServers(), gearman_client_add_servers()
  3. --SKIPIF--
  4. <?php if (!extension_loaded("gearman")) print "skip";
  5. require_once('skipifconnect.inc');
  6. ?>
  7. --FILE--
  8. <?php
  9. $client = new GearmanClient();
  10. print "GearmanClient::addServer(OO): " . ($client->addServers('localhost,localhost:4730') ? 'Success' : 'Failure') . PHP_EOL;
  11. $client2 = gearman_client_create();
  12. print "gearman_client_add_servers (Procedural): " . (gearman_client_add_servers($client2, 'localhost,localhost:4730') ? 'Success' : 'Failure') . PHP_EOL;
  13. print "OK";
  14. ?>
  15. --EXPECT--
  16. GearmanClient::addServer(OO): Success
  17. gearman_client_add_servers (Procedural): Success
  18. OK