@@ -62,7 +62,7 @@ |
||
62 | 62 | { |
63 | 63 | public function __construct($testEnvironmentName, $groupId) |
64 | 64 | { |
65 | - $msg = "in test environment {$testEnvironmentName}: attempt to create two or more groups with the same group ID {$groupId}"; |
|
65 | + $msg = "in test environment {$testEnvironmentName}: attempt to create two or more groups with the same group ID {$groupId}"; |
|
66 | 66 | parent::__construct(400, $msg, $msg); |
67 | 67 | } |
68 | 68 | } |
69 | 69 | \ No newline at end of file |
@@ -62,7 +62,7 @@ |
||
62 | 62 | { |
63 | 63 | public function __construct($testEnvironmentName, $groupId, $hostId) |
64 | 64 | { |
65 | - $msg = "in test environment {$testEnvironmentName}, group {$groupId}, hostIds must all be strings, at least one " . gettype($hostId) . " found instead"; |
|
65 | + $msg = "in test environment {$testEnvironmentName}, group {$groupId}, hostIds must all be strings, at least one " . gettype($hostId) . " found instead"; |
|
66 | 66 | parent::__construct(400, $msg, $msg); |
67 | 67 | } |
68 | 68 | } |
69 | 69 | \ No newline at end of file |
@@ -62,7 +62,7 @@ |
||
62 | 62 | { |
63 | 63 | public function __construct($testEnvironmentName, $groupId, $hostId, $role) |
64 | 64 | { |
65 | - $msg = "in test environment {$testEnvironmentName}, group {$groupId}, host {$hostId}: roles must be an array of strings; contains at least one " . gettype($role) . " instead"; |
|
65 | + $msg = "in test environment {$testEnvironmentName}, group {$groupId}, host {$hostId}: roles must be an array of strings; contains at least one " . gettype($role) . " instead"; |
|
66 | 66 | parent::__construct(400, $msg, $msg); |
67 | 67 | } |
68 | 68 | } |
69 | 69 | \ No newline at end of file |
@@ -62,7 +62,7 @@ |
||
62 | 62 | { |
63 | 63 | public function __construct($testEnvironmentName, $groupId, $hostId, $roles) |
64 | 64 | { |
65 | - $msg = "in test environment {$testEnvironmentName}, group {$groupId}, host {$hostId}: roles must be an array; " . gettype($roles) . " received instead"; |
|
65 | + $msg = "in test environment {$testEnvironmentName}, group {$groupId}, host {$hostId}: roles must be an array; " . gettype($roles) . " received instead"; |
|
66 | 66 | parent::__construct(400, $msg, $msg); |
67 | 67 | } |
68 | 68 | } |
69 | 69 | \ No newline at end of file |
@@ -63,7 +63,7 @@ |
||
63 | 63 | { |
64 | 64 | public function __construct($testEnvironmentName, $groupId, $hostId, $hostManager, $groupAdapter) |
65 | 65 | { |
66 | - $msg = "in test environment {$testEnvironmentName}, group {$groupId}, host {$hostId}: host adapter '" . gettype($hostManager) . "' isn't compatible with group of type '" . gettype($groupAdapter) . "'"; |
|
66 | + $msg = "in test environment {$testEnvironmentName}, group {$groupId}, host {$hostId}: host adapter '" . gettype($hostManager) . "' isn't compatible with group of type '" . gettype($groupAdapter) . "'"; |
|
67 | 67 | parent::__construct(400, $msg, $msg); |
68 | 68 | } |
69 | 69 | } |
70 | 70 | \ No newline at end of file |
@@ -63,7 +63,7 @@ |
||
63 | 63 | { |
64 | 64 | public function __construct($testEnvironmentName, $groupId) |
65 | 65 | { |
66 | - $msg = "in test environment {$testEnvironmentName}, group {$groupId}: need a group adapter first"; |
|
66 | + $msg = "in test environment {$testEnvironmentName}, group {$groupId}: need a group adapter first"; |
|
67 | 67 | parent::__construct(400, $msg, $msg); |
68 | 68 | } |
69 | 69 | } |
70 | 70 | \ No newline at end of file |
@@ -58,34 +58,34 @@ |
||
58 | 58 | */ |
59 | 59 | class DeviceLib |
60 | 60 | { |
61 | - /** |
|
62 | - * @param \DataSift\Stone\ObjectLib\BaseObject $deviceDetails |
|
63 | - */ |
|
64 | - public static function getDeviceAdapter($deviceDetails) |
|
65 | - { |
|
66 | - // which namespace do our device adapters live in? |
|
67 | - $namespace = 'DataSift\Storyplayer\DeviceLib\\'; |
|
61 | + /** |
|
62 | + * @param \DataSift\Stone\ObjectLib\BaseObject $deviceDetails |
|
63 | + */ |
|
64 | + public static function getDeviceAdapter($deviceDetails) |
|
65 | + { |
|
66 | + // which namespace do our device adapters live in? |
|
67 | + $namespace = 'DataSift\Storyplayer\DeviceLib\\'; |
|
68 | 68 | |
69 | - // where do we want to get the device from? |
|
70 | - $adapterClass = $namespace . $deviceDetails->adapter . 'Adapter'; |
|
69 | + // where do we want to get the device from? |
|
70 | + $adapterClass = $namespace . $deviceDetails->adapter . 'Adapter'; |
|
71 | 71 | |
72 | - // do we have the adapter? |
|
73 | - if (!class_exists($adapterClass)) { |
|
74 | - throw new E4xx_NoSuchDeviceAdapter($deviceDetails->adapter); |
|
75 | - } |
|
72 | + // do we have the adapter? |
|
73 | + if (!class_exists($adapterClass)) { |
|
74 | + throw new E4xx_NoSuchDeviceAdapter($deviceDetails->adapter); |
|
75 | + } |
|
76 | 76 | |
77 | - // create the adapter |
|
78 | - $deviceAdapter = new $adapterClass; |
|
77 | + // create the adapter |
|
78 | + $deviceAdapter = new $adapterClass; |
|
79 | 79 | |
80 | - // is this an adapter we're happy with? |
|
81 | - if (!$deviceAdapter instanceof \DataSift\Storyplayer\DeviceLib\DeviceAdapter) { |
|
82 | - throw new E5xx_BadDeviceAdapter($adapterClass); |
|
83 | - } |
|
80 | + // is this an adapter we're happy with? |
|
81 | + if (!$deviceAdapter instanceof \DataSift\Storyplayer\DeviceLib\DeviceAdapter) { |
|
82 | + throw new E5xx_BadDeviceAdapter($adapterClass); |
|
83 | + } |
|
84 | 84 | |
85 | - // initialise the adapter |
|
86 | - $deviceAdapter->init($deviceDetails); |
|
85 | + // initialise the adapter |
|
86 | + $deviceAdapter->init($deviceDetails); |
|
87 | 87 | |
88 | - // all done |
|
89 | - return $deviceAdapter; |
|
90 | - } |
|
88 | + // all done |
|
89 | + return $deviceAdapter; |
|
90 | + } |
|
91 | 91 | } |
92 | 92 | \ No newline at end of file |
@@ -89,7 +89,7 @@ |
||
89 | 89 | // make sure it is an array, as that is what the |
90 | 90 | // underlying WebDriver library requires |
91 | 91 | else if (is_object($browserDetails->desiredCapabilities)) { |
92 | - $browserDetails->desiredCapabilities = (array) ($browserDetails->desiredCapabilities); |
|
92 | + $browserDetails->desiredCapabilities = (array)($browserDetails->desiredCapabilities); |
|
93 | 93 | } |
94 | 94 | } |
95 | 95 |
@@ -62,7 +62,8 @@ |
||
62 | 62 | * |
63 | 63 | * @param string $provider |
64 | 64 | */ |
65 | - public function __construct($provider) { |
|
65 | + public function __construct($provider) |
|
66 | + { |
|
66 | 67 | $msg = "Unknown device adapter '{$provider}'"; |
67 | 68 | parent::__construct(400, $msg, $msg); |
68 | 69 | } |