Sha256: 5f4dcb06c411db64acba8b47a65a7ac0bb703962a3de7f85a5164513041059a9
Contents?: true
Size: 926 Bytes
Versions: 3
Compression:
Stored size: 926 Bytes
Contents
<?php /** * This class allows multiple concurrent connections to the same Cuke4php port. Each connection forks a process that * loads the same feature files and then runs the step definitions. This is useful for cases where the Cuke4php server * is deployed to a remote machine and multiple automation scripts are simultaneously connecting to the server. * * Uses the PEAR Net_Server package **/ require_once "Cuke4Php.php"; require_once "Net/Server.php"; require_once "Net/Server/Handler.php"; class Cuke4PhpForkingServer extends Net_Server_Handler { private $cuke4php; function __construct($_sFeaturePath, $_iPort) { $this->cuke4php = new Cuke4Php($_sFeaturePath, $_iPort); } function onReceiveData($iClientId = 0, $data = "") { $output = json_encode($this->cuke4php->process($data)) . "\n"; $this->_server->sendData($iClientId, $output); } function onClose($iClientId) { // Do nothing } } ?>
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
cuke4php-0.9.10 | lib/Cuke4PhpForkingServer.php |
cuke4php-0.9.9 | lib/Cuke4PhpForkingServer.php |
cuke4php-0.9.8 | lib/Cuke4PhpForkingServer.php |