Permalink
Browse files

- Streamline.

- Correct error messages.
- Add @since docblocks for new methods.
  • Loading branch information...
1 parent f33008a commit ae53e76cba5a20307f2ac2981037630324d6f7c6 @sebastianbergmann committed Mar 20, 2007
Showing with 16 additions and 10 deletions.
  1. +16 −10 PHPUnit/Extensions/SeleniumTestCase.php
@@ -794,6 +794,7 @@ public function assertNotVisible($locator)
*
* @param string $action
* @access protected
+ * @since Method available since Release 3.1.0
*/
protected function defaultAssertions($action)
{
@@ -808,6 +809,7 @@ protected function defaultAssertions($action)
* @access private
* @author Shin Ohno <ganchiku@gmail.com>
* @author Bjoern Schotte <schotte@mayflower.de>
+ * @since Method available since Release 3.1.0
*/
private function doCommand($command, array $arguments = array())
{
@@ -829,7 +831,7 @@ private function doCommand($command, array $arguments = array())
if (!$handle = fopen($url, 'r')) {
throw new RuntimeException(
- 'Could not connect to Selenium RC server.'
+ 'Could not connect to the Selenium RC server.'
);
}
@@ -839,7 +841,7 @@ private function doCommand($command, array $arguments = array())
if (!preg_match('/^OK/', $response)) {
throw new RuntimeException(
- 'The Response from the Selenium RC server is invalid: ' . $response
+ 'The response from the Selenium RC server is invalid: ' . $response
);
}
@@ -856,6 +858,7 @@ private function doCommand($command, array $arguments = array())
* @access private
* @author Shin Ohno <ganchiku@gmail.com>
* @author Bjoern Schotte <schotte@mayflower.de>
+ * @since Method available since Release 3.1.0
*/
private function getBoolean($command, array $arguments)
{
@@ -880,6 +883,7 @@ private function getBoolean($command, array $arguments)
* @access private
* @author Shin Ohno <ganchiku@gmail.com>
* @author Bjoern Schotte <schotte@mayflower.de>
+ * @since Method available since Release 3.1.0
*/
private function getNumber($command, array $arguments)
{
@@ -902,6 +906,7 @@ private function getNumber($command, array $arguments)
* @access private
* @author Shin Ohno <ganchiku@gmail.com>
* @author Bjoern Schotte <schotte@mayflower.de>
+ * @since Method available since Release 3.1.0
*/
private function getString($command, array $arguments)
{
@@ -926,38 +931,39 @@ private function getString($command, array $arguments)
* @access private
* @author Shin Ohno <ganchiku@gmail.com>
* @author Bjoern Schotte <schotte@mayflower.de>
+ * @since Method available since Release 3.1.0
*/
private function getStringArray($command, array $arguments)
{
$csv = $this->getString($command, $arguments);
$token = '';
$tokens = array();
$letters = preg_split('//', $csv, -1, PREG_SPLIT_NO_EMPTY);
+ $count = count($letters);
- for ($i = 0; $i < count($letters); $i++) {
+ for ($i = 0; $i < $count; $i++) {
$letter = $letters[$i];
switch($letter) {
case '\\': {
- $i++;
- $letter = $letters[$i];
- $token = $token . $letter;
+ $letter = $letters[++$i];
+ $token .= $letter;
}
break;
case ',': {
- array_push($tokens, $token);
- $token = '';
+ $tokens[] = $token;
+ $token = '';
}
break;
default: {
- $token = $token . $letter;
+ $token .= $letter;
}
}
}
- array_push($tokens, $token);
+ $tokens[] = $token;
return $tokens;
}

0 comments on commit ae53e76

Please sign in to comment.