@@ -87,8 +87,7 @@ |
||
87 | 87 | * Combined action attribute with current location |
88 | 88 | * to get an absolute form target. |
89 | 89 | * @param string $action Action attribute from form tag. |
90 | - * @param SimpleUrl $base Page location. |
|
91 | - * @return SimpleUrl Absolute form target. |
|
90 | + * @param SimplePage $page |
|
92 | 91 | */ |
93 | 92 | function _createAction($action, &$page) { |
94 | 93 | if (($action === '') || ($action === false)) { |
@@ -468,7 +468,7 @@ discard block |
||
468 | 468 | /** |
469 | 469 | * Finds a held form by button label. Will only |
470 | 470 | * search correctly built forms. |
471 | - * @param SimpleSelector $selector Button finder. |
|
471 | + * @param SimpleByLabel $selector Button finder. |
|
472 | 472 | * @return SimpleForm Form object containing |
473 | 473 | * the button. |
474 | 474 | * @access public |
@@ -483,7 +483,7 @@ discard block |
||
483 | 483 | * Will only search correctly built forms. The first |
484 | 484 | * form found either within the focused frame, or |
485 | 485 | * across frames, will be the one returned. |
486 | - * @param SimpleSelector $selector Image finder. |
|
486 | + * @param SimpleByLabel $selector Image finder. |
|
487 | 487 | * @return SimpleForm Form object containing |
488 | 488 | * the image. |
489 | 489 | * @access public |
@@ -562,7 +562,7 @@ discard block |
||
562 | 562 | * available. |
563 | 563 | * @param SimpleSelector $selector Field finder. |
564 | 564 | * @param string $value Value to set field to. |
565 | - * @return boolean True if value is valid. |
|
565 | + * @return boolean|null True if value is valid. |
|
566 | 566 | * @access public |
567 | 567 | */ |
568 | 568 | function setField($selector, $value) { |
@@ -577,7 +577,7 @@ discard block |
||
577 | 577 | |
578 | 578 | /** |
579 | 579 | * Accessor for a form element value within a page. |
580 | - * @param SimpleSelector $selector Field finder. |
|
580 | + * @param SimpleByName $selector Field finder. |
|
581 | 581 | * @return string/boolean A string if the field is |
582 | 582 | * present, false if unchecked |
583 | 583 | * and null if missing. |
@@ -135,9 +135,6 @@ discard block |
||
135 | 135 | /** |
136 | 136 | * Creates the first line which is the actual request. |
137 | 137 | * @param string $method HTTP request method, usually GET. |
138 | - * @param SimpleUrl $url URL as object. |
|
139 | - * @return string Request line content. |
|
140 | - * @access protected |
|
141 | 138 | */ |
142 | 139 | function _getRequestLine($method) { |
143 | 140 | $url = $this->getUrl(); |
@@ -149,9 +146,6 @@ discard block |
||
149 | 146 | |
150 | 147 | /** |
151 | 148 | * Creates the host part of the request. |
152 | - * @param SimpleUrl $url URL as object. |
|
153 | - * @return string Host line content. |
|
154 | - * @access protected |
|
155 | 149 | */ |
156 | 150 | function _getHostLine() { |
157 | 151 | $host = 'Host: ' . $this->_proxy->getHost(); |
@@ -235,10 +229,6 @@ discard block |
||
235 | 229 | /** |
236 | 230 | * Sends the headers. |
237 | 231 | * @param SimpleSocket $socket Open socket. |
238 | - * @param string $method HTTP request method, |
|
239 | - * usually GET. |
|
240 | - * @param SimpleFormEncoding $encoding Content to send with request. |
|
241 | - * @access private |
|
242 | 232 | */ |
243 | 233 | function _dispatchRequest(&$socket, $encoding) { |
244 | 234 | foreach ($this->_headers as $header_line) { |
@@ -323,7 +313,7 @@ discard block |
||
323 | 313 | |
324 | 314 | /** |
325 | 315 | * Accessor for parsed HTTP protocol version. |
326 | - * @return integer HTTP error code. |
|
316 | + * @return false|string HTTP error code. |
|
327 | 317 | * @access public |
328 | 318 | */ |
329 | 319 | function getHttpVersion() { |
@@ -565,7 +555,7 @@ discard block |
||
565 | 555 | /** |
566 | 556 | * Accessor for the content after the last |
567 | 557 | * header line. |
568 | - * @return string All content. |
|
558 | + * @return boolean All content. |
|
569 | 559 | * @access public |
570 | 560 | */ |
571 | 561 | function getContent() { |
@@ -575,7 +565,7 @@ discard block |
||
575 | 565 | /** |
576 | 566 | * Accessor for header block. The response is the |
577 | 567 | * combination of this and the content. |
578 | - * @return SimpleHeaders Wrapped header block. |
|
568 | + * @return SimpleHttpHeaders Wrapped header block. |
|
579 | 569 | * @access public |
580 | 570 | */ |
581 | 571 | function getHeaders() { |
@@ -36,12 +36,6 @@ discard block |
||
36 | 36 | |
37 | 37 | /** |
38 | 38 | * Sets the expected parameter list. |
39 | - * @param array $parameters Array of parameters including |
|
40 | - * those that are wildcarded. |
|
41 | - * If the value is not an array |
|
42 | - * then it is considered to match any. |
|
43 | - * @param string $message Customised message on failure. |
|
44 | - * @access public |
|
45 | 39 | */ |
46 | 40 | function ParametersExpectation($expected = false, $message = '%s') { |
47 | 41 | $this->SimpleExpectation($message); |
@@ -73,7 +67,7 @@ discard block |
||
73 | 67 | * Tests an individual parameter. |
74 | 68 | * @param mixed $parameter Value to test. |
75 | 69 | * @param mixed $expected Comparison value. |
76 | - * @return boolean True if expectation |
|
70 | + * @return boolean|null True if expectation |
|
77 | 71 | * fulfilled. |
78 | 72 | * @access private |
79 | 73 | */ |
@@ -84,10 +78,6 @@ discard block |
||
84 | 78 | |
85 | 79 | /** |
86 | 80 | * Returns a human readable test message. |
87 | - * @param array $comparison Incoming parameter list. |
|
88 | - * @return string Description of success |
|
89 | - * or failure. |
|
90 | - * @access public |
|
91 | 81 | */ |
92 | 82 | function testMessage($parameters) { |
93 | 83 | if ($this->test($parameters)) { |
@@ -102,7 +92,7 @@ discard block |
||
102 | 92 | /** |
103 | 93 | * Message to display if expectation differs from |
104 | 94 | * the parameters actually received. |
105 | - * @param array $expected Expected parameters as list. |
|
95 | + * @param boolean $expected Expected parameters as list. |
|
106 | 96 | * @param array $parameters Actual parameters received. |
107 | 97 | * @return string Description of difference. |
108 | 98 | * @access private |
@@ -674,7 +664,7 @@ discard block |
||
674 | 664 | |
675 | 665 | /** |
676 | 666 | * Finds currently running test. |
677 | - * @return SimpeTestCase Current test case. |
|
667 | + * @return SimpleTestCase Current test case. |
|
678 | 668 | * @access protected |
679 | 669 | */ |
680 | 670 | function &_getCurrentTestCase() { |
@@ -686,7 +676,7 @@ discard block |
||
686 | 676 | * Die if bad arguments array is passed. |
687 | 677 | * @param mixed $args The arguments value to be checked. |
688 | 678 | * @param string $task Description of task attempt. |
689 | - * @return boolean Valid arguments |
|
679 | + * @return boolean|null Valid arguments |
|
690 | 680 | * @access private |
691 | 681 | */ |
692 | 682 | function _checkArgumentsIsArray($args, $task) { |
@@ -1362,6 +1352,11 @@ discard block |
||
1362 | 1352 | return $code; |
1363 | 1353 | } |
1364 | 1354 | |
1355 | + /** |
|
1356 | + * @param string $mock_class |
|
1357 | + * @param string $class |
|
1358 | + * @param string $constructor |
|
1359 | + */ |
|
1365 | 1360 | private function getNamespace(&$mock_class, &$class, &$constructor) { |
1366 | 1361 | $code = ''; |
1367 | 1362 | $last_backslash = strrpos($this->_class, '\\'); |
@@ -169,8 +169,8 @@ discard block |
||
169 | 169 | |
170 | 170 | /** |
171 | 171 | * Creates the parser used with the builder. |
172 | - * @param $listener SimpleSaxListener Target of parser. |
|
173 | - * @return SimpleSaxParser Parser to generate |
|
172 | + * @param SimplePageBuilder $listener SimpleSaxListener Target of parser. |
|
173 | + * @return SimpleHtmlSaxParser Parser to generate |
|
174 | 174 | * events for the builder. |
175 | 175 | * @access protected |
176 | 176 | */ |
@@ -405,7 +405,7 @@ discard block |
||
405 | 405 | |
406 | 406 | /** |
407 | 407 | * Original request as bytes sent down the wire. |
408 | - * @return mixed Sent content. |
|
408 | + * @return string|false Sent content. |
|
409 | 409 | * @access public |
410 | 410 | */ |
411 | 411 | function getRequest() { |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | |
415 | 415 | /** |
416 | 416 | * Accessor for raw text of page. |
417 | - * @return string Raw unparsed content. |
|
417 | + * @return boolean Raw unparsed content. |
|
418 | 418 | * @access public |
419 | 419 | */ |
420 | 420 | function getRaw() { |
@@ -466,7 +466,7 @@ discard block |
||
466 | 466 | |
467 | 467 | /** |
468 | 468 | * Base URL if set via BASE tag page url otherwise |
469 | - * @return SimpleUrl Base url. |
|
469 | + * @return boolean Base url. |
|
470 | 470 | * @access public |
471 | 471 | */ |
472 | 472 | function getBaseUrl() { |
@@ -657,7 +657,7 @@ discard block |
||
657 | 657 | /** |
658 | 658 | * Opens a frameset. A frameset may contain nested |
659 | 659 | * frameset tags. |
660 | - * @param SimpleFramesetTag $tag Tag to accept. |
|
660 | + * @param SimpleTag $tag Tag to accept. |
|
661 | 661 | * @access public |
662 | 662 | */ |
663 | 663 | function acceptFramesetStart(&$tag) { |
@@ -90,8 +90,6 @@ discard block |
||
90 | 90 | * regular expression separated with the |
91 | 91 | * "or" operator. Caches the regex. |
92 | 92 | * Will automatically escape (, ) and / tokens. |
93 | - * @param array $patterns List of patterns in order. |
|
94 | - * @access private |
|
95 | 93 | */ |
96 | 94 | function _getCompoundedRegex() { |
97 | 95 | if ($this->_regex == null) { |
@@ -468,7 +466,7 @@ discard block |
||
468 | 466 | |
469 | 467 | /** |
470 | 468 | * List of parsed tags. Others are ignored. |
471 | - * @return array List of searched for tags. |
|
469 | + * @return string[] List of searched for tags. |
|
472 | 470 | * @access private |
473 | 471 | */ |
474 | 472 | function _getParsedTags() { |
@@ -573,7 +571,7 @@ discard block |
||
573 | 571 | |
574 | 572 | /** |
575 | 573 | * Sets up the matching lexer. Starts in 'text' mode. |
576 | - * @param SimpleSaxParser $parser Event generator, usually $self. |
|
574 | + * @param SimpleHtmlSaxParser $parser Event generator, usually $self. |
|
577 | 575 | * @return SimpleLexer Lexer suitable for this parser. |
578 | 576 | * @access public |
579 | 577 | * @static |
@@ -591,7 +589,7 @@ discard block |
||
591 | 589 | * name is converted to lower case. |
592 | 590 | * @param string $token Incoming characters. |
593 | 591 | * @param integer $event Lexer event type. |
594 | - * @return boolean False if parse error. |
|
592 | + * @return boolean|null False if parse error. |
|
595 | 593 | * @access public |
596 | 594 | */ |
597 | 595 | function acceptStartToken($token, $event) { |
@@ -619,7 +617,7 @@ discard block |
||
619 | 617 | * The element name is converted to lower case. |
620 | 618 | * @param string $token Incoming characters. |
621 | 619 | * @param integer $event Lexer event type. |
622 | - * @return boolean False if parse error. |
|
620 | + * @return boolean|null False if parse error. |
|
623 | 621 | * @access public |
624 | 622 | */ |
625 | 623 | function acceptEndToken($token, $event) { |
@@ -654,7 +652,7 @@ discard block |
||
654 | 652 | * A character entity. |
655 | 653 | * @param string $token Incoming characters. |
656 | 654 | * @param integer $event Lexer event type. |
657 | - * @return boolean False if parse error. |
|
655 | + * @return boolean|null False if parse error. |
|
658 | 656 | * @access public |
659 | 657 | */ |
660 | 658 | function acceptEntityToken($token, $event) { |
@@ -665,7 +663,7 @@ discard block |
||
665 | 663 | * important. |
666 | 664 | * @param string $token Incoming characters. |
667 | 665 | * @param integer $event Lexer event type. |
668 | - * @return boolean False if parse error. |
|
666 | + * @return boolean|null False if parse error. |
|
669 | 667 | * @access public |
670 | 668 | */ |
671 | 669 | function acceptTextToken($token, $event) { |
@@ -737,7 +735,7 @@ discard block |
||
737 | 735 | * @param hash $attributes Name value pairs. |
738 | 736 | * Attributes without content |
739 | 737 | * are marked as true. |
740 | - * @return boolean False on parse error. |
|
738 | + * @return boolean|null False on parse error. |
|
741 | 739 | * @access public |
742 | 740 | */ |
743 | 741 | function startElement($name, $attributes) { |
@@ -746,7 +744,7 @@ discard block |
||
746 | 744 | /** |
747 | 745 | * End of element event. |
748 | 746 | * @param string $name Element name. |
749 | - * @return boolean False on parse error. |
|
747 | + * @return boolean|null False on parse error. |
|
750 | 748 | * @access public |
751 | 749 | */ |
752 | 750 | function endElement($name) { |
@@ -755,7 +753,7 @@ discard block |
||
755 | 753 | /** |
756 | 754 | * Unparsed, but relevant data. |
757 | 755 | * @param string $text May include unparsed tags. |
758 | - * @return boolean False on parse error. |
|
756 | + * @return boolean|null False on parse error. |
|
759 | 757 | * @access public |
760 | 758 | */ |
761 | 759 | function addContent($text) { |
@@ -82,7 +82,7 @@ |
||
82 | 82 | /** |
83 | 83 | * Creates the XML parser. |
84 | 84 | * @param SimpleReporter $reporter Target of test results. |
85 | - * @return SimpleTestXmlListener XML reader. |
|
85 | + * @return SimpleTestXmlParser XML reader. |
|
86 | 86 | * @access protected |
87 | 87 | */ |
88 | 88 | function &_createParser(&$reporter) { |
@@ -351,6 +351,7 @@ |
||
351 | 351 | * name was specified at the beginning, then all tests |
352 | 352 | * can run. |
353 | 353 | * @param string $method The incoming test method. |
354 | + * @param string $test_case |
|
354 | 355 | * @return boolean True if matched. |
355 | 356 | * @access protected |
356 | 357 | */ |
@@ -287,8 +287,6 @@ discard block |
||
287 | 287 | * Paints the end of a group test. Will paint the page |
288 | 288 | * footer if the stack of tests has unwound. |
289 | 289 | * @param string $test_name Name of test that is ending. |
290 | - * @param integer $progress Number of test cases ending. |
|
291 | - * @access public |
|
292 | 290 | */ |
293 | 291 | function paintGroupEnd($test_name) { |
294 | 292 | array_pop($this->_test_stack); |
@@ -603,7 +601,7 @@ discard block |
||
603 | 601 | * Chains to the wrapped reporter. |
604 | 602 | * @param string $type Event type as text. |
605 | 603 | * @param mixed $payload Message or object. |
606 | - * @return boolean Should return false if this |
|
604 | + * @return boolean|null Should return false if this |
|
607 | 605 | * type of signal should fail the |
608 | 606 | * test suite. |
609 | 607 | * @access public |
@@ -849,7 +847,7 @@ discard block |
||
849 | 847 | * Chains to the wrapped reporter. |
850 | 848 | * @param string $type Event type as text. |
851 | 849 | * @param mixed $payload Message or object. |
852 | - * @return boolean Should return false if this |
|
850 | + * @return boolean|null Should return false if this |
|
853 | 851 | * type of signal should fail the |
854 | 852 | * test suite. |
855 | 853 | * @access public |