Example #1
0
 /**
  * @param $context TestSwarmContext
  * @param $runToken string
  * @param $clientID int: [optional] Instead of creating a new client entry,
  * create an instance for an existing client entry.
  */
 public static function newFromContext(TestSwarmContext $context, $runToken, $clientID = null)
 {
     self::validateRunToken($context, $runToken);
     $client = new self();
     $client->context = $context;
     if ($clientID !== null) {
         $client->loadFromID($clientID);
     } else {
         $client->loadNew();
     }
     return $client;
 }