gearman_worker_009.phpt 547 B

123456789101112131415161718192021
  1. --TEST--
  2. gearman_worker_set_id()
  3. --SKIPIF--
  4. <?php if (!extension_loaded("gearman")) print "skip"; ?>
  5. --FILE--
  6. <?php
  7. $id = 'test';
  8. $worker = new GearmanWorker();
  9. print "GearmanWorker::setId() (OO): " . ($worker->setId($id) === true ? "Success" : "Failure").PHP_EOL;
  10. $worker2 = gearman_worker_create();
  11. print "gearman_worker_set_id() (Procedural): " . (gearman_worker_set_id($worker, $id) === true ? "Success" : "Failure").PHP_EOL;
  12. print "OK";
  13. ?>
  14. --EXPECT--
  15. GearmanWorker::setId() (OO): Success
  16. gearman_worker_set_id() (Procedural): Success
  17. OK