Class WebTestCase

Description

Test case for testing of web pages. Allows fetching of pages, parsing of HTML and submitting forms.

Located in /web_tester.php (line 433)

SimpleTestCase
   |
   --WebTestCase
Direct descendents
Class Description
 class DomTestCase DomTestCase
Method Summary
 WebTestCase __construct ([string $label = false])
 void addHeader (string $header)
 void after (string $method)
 void ageCookies (integer $interval)
 boolean assertAuthentication ([string $authentication = false], [string $message = '%s'])
 boolean assertClickable (string $label, [ $message = '%s'])
 boolean assertCookie (string $name, [string $expected = false], [string $message = '%s'])
 boolean assertEqual (mixed $first, mixed $second, [string $message = '%s'])
 boolean assertFalse (boolean $result, [string $message = '%s'])
 boolean assertField ( $label, [mixed $expected = true], [string $message = '%s'], string $name)
 boolean assertFieldById (string/integer $id, [mixed $expected = true], [string $message = '%s'])
 boolean assertFieldByName (string $name, [mixed $expected = true], [string $message = '%s'])
 boolean assertFieldValue (string $identifier, mixed $value, mixed $expected, string $message)
 boolean assertHeader (string $header, [mixed $value = false], [ $message = '%s'])
 boolean assertImage (string $label, [ $message = '%s'])
 boolean assertLink (string $label, [mixed $expected = true], [string $message = '%s'])
 boolean assertLinkById (string $id, [mixed $expected = true], [string $message = '%s'])
 boolean assertMime (array $types, [string $message = '%s'])
 boolean assertNoAuthentication ([string $message = '%s'])
 boolean assertNoCookie (string $name, [string $message = '%s'])
 boolean assertNoHeader (string $header, [ $message = '%s'])
 boolean assertNoLink (string/integer $label, [string $message = '%s'])
 boolean assertNoLinkById (string $id, [string $message = '%s'])
 boolean assertNoPattern (string $pattern, [string $message = '%s'])
 boolean assertNotEqual (mixed $first, mixed $second, [string $message = '%s'])
 boolean assertNoText (string $text, [string $message = '%s'])
 boolean assertPattern (string $pattern, [string $message = '%s'])
 boolean assertRealm (string $realm, [string $message = '%s'])
 boolean assertResponse (array $responses, [string $message = '%s'])
 boolean assertSubmit (string $label, [ $message = '%s'])
 boolean assertText (string $text, [string $message = '%s'])
 boolean assertTitle ([string/SimpleExpectation $title = false], [string $message = '%s'])
 boolean assertTrue (boolean $result, [string $message = false])
 boolean/string authenticate (string $username, string $password)
 boolean back ()
 void before (string $method)
 void clearFrameFocus ()
 string/boolean click (string $label)
 boolean/string clickImage (string $label, [integer $x = 1], [integer $y = 1], [hash $additional = false])
 boolean/string clickImageById (integer/string $id, [integer $x = 1], [integer $y = 1], [hash $additional = false])
 boolean/string clickImageByName (string $name, [integer $x = 1], [integer $y = 1], [hash $additional = false])
 boolean/string clickLink (string $label, [integer $index = 0])
 boolean/string clickLinkById (string $id)
 boolean/string clickSubmit ([string $label = 'Submit'], [hash $additional = false])
 boolean/string clickSubmitById (string $id, [hash $additional = false])
 boolean/string clickSubmitByName (string $name, [hash $additional = false])
 TestBrowser createBrowser ()
 boolean/string delete (string $url, [hash $parameters = false])
 string/boolean failOnError (string/boolean $result)
 boolean forward ()
 boolean/string get (string $url, [hash $parameters = false])
 string getAssertionLine ()
 string getCookie (string $name)
 integer/string/boolean getFrameFocus ()
 string getTransportError ()
 string getUrl ()
 boolean head (string $url, [hash $parameters = false])
 void ignoreCookies ()
 void ignoreErrors ()
 void ignoreFrames ()
 boolean/string post (string $url, [mixed $parameters = false], [string $content_type = false])
 boolean/string put (string $url, [mixed $body = false], [string $content_type = false])
 void restart ([string/integer $date = false])
 boolean retry ()
 void setBrowser (SimpleBrowser $browser)
 void setConnectionTimeout (integer $timeout)
 void setCookie (string $name, string $value, [string $host = false], [string $path = '/'], [string $expiry = false])
 boolean setField ( $label, string $value, [ $position = false], string $name)
 boolean setFieldById (string/integer $id, string $value)
 boolean setFieldByName (string $name, string $value, [ $position = false])
 boolean setFrameFocus (string $name)
 boolean setFrameFocusByIndex (integer $choice)
 void setMaximumRedirects (integer $max)
 void setParser (object The $parser)
 void showHeaders ()
 void showRequest ()
 void showSource ()
 void showText ()
 boolean/string submitFormById (string $id)
 void unsetBrowser ()
 void useProxy (string $proxy, [string $username = false], [string $password = false])
Variables

Inherited Variables

Inherited from SimpleTestCase

SimpleTestCase::$reporter
Methods
Constructor __construct (line 444)

Creates an empty test case. Should be subclassed with test methods for a functional test case.

  • access: public
WebTestCase __construct ([string $label = false])
  • string $label: Name of test case. Will use the class name if none specified.

Redefinition of:
SimpleTestCase::__construct()
Sets up the test with no display.
addHeader (line 648)

Adds a header to every fetch.

  • access: public
void addHeader (string $header)
  • string $header: Header line to add to every request until cleared.
after (line 463)

Announces the end of the test. Includes private clean up.

  • access: public
void after (string $method)
  • string $method: Test method just finished.

Redefinition of:
SimpleTestCase::after()
Announces the end of the test. Includes private clean up.
ageCookies (line 593)

Moves cookie expiry times back into the past.

Useful for testing timeouts and expiries.

  • access: public
void ageCookies (integer $interval)
  • integer $interval: Amount to age in seconds.
assertAuthentication (line 1268)

Attempt to match the authentication type within the security realm we are currently matching.

  • return: True if pass.
  • access: public
boolean assertAuthentication ([string $authentication = false], [string $message = '%s'])
  • string $authentication: Usually basic.
  • string $message: Message to display.
assertClickable (line 885)

Checks for a click target.

  • return: True if click target.
  • access: public
boolean assertClickable (string $label, [ $message = '%s'])
  • string $label: Visible text or alt text.
  • $message
assertCookie (line 1433)

Checks that a cookie is set for the current page and optionally checks the value.

  • return: True if pass.
  • access: public
boolean assertCookie (string $name, [string $expected = false], [string $message = '%s'])
  • string $name: Name of cookie to test.
  • string $expected: Expected value as a string or false if any value will do.
  • string $message: Message to display.
assertEqual (line 1497)

Will trigger a pass if the two parameters have the same value only. Otherwise a fail. This is for testing hand extracted text, etc.

  • return: True on pass
  • access: public
boolean assertEqual (mixed $first, mixed $second, [string $message = '%s'])
  • mixed $first: Value to compare.
  • mixed $second: Value to compare.
  • string $message: Message to display.
assertFalse (line 1483)

Will be true on false and vice versa. False is the PHP definition of false, so that null, empty strings, zero and an empty array all count as false.

  • return: True on pass
  • access: public
boolean assertFalse (boolean $result, [string $message = '%s'])
  • boolean $result: Pass on false.
  • string $message: Message to display.
assertField (line 1162)

Confirms that the form element is currently set to the expected value. A missing form will always fail. If no value is given then only the existence of the field is checked.

  • return: True if pass.
  • access: public
boolean assertField ( $label, [mixed $expected = true], [string $message = '%s'], string $name)
  • string $name: Name of field in forms.
  • mixed $expected: Expected string/array value or false for unset fields.
  • string $message: Message to display. Default can be embedded with %s.
  • $label
assertFieldById (line 1198)

Confirms that the form element is currently set to the expected value. A missing form will always fail. If no ID is given then only the existence of the field is checked.

  • return: True if pass.
  • access: public
boolean assertFieldById (string/integer $id, [mixed $expected = true], [string $message = '%s'])
  • string/integer $id: Name of field in forms.
  • mixed $expected: Expected string/array value or false for unset fields.
  • string $message: Message to display. Default can be embedded with %s.
assertFieldByName (line 1180)

Confirms that the form element is currently set to the expected value. A missing form element will always fail. If no value is given then only the existence of the field is checked.

  • return: True if pass.
  • access: public
boolean assertFieldByName (string $name, [mixed $expected = true], [string $message = '%s'])
  • string $name: Name of field in forms.
  • mixed $expected: Expected string/array value or false for unset fields.
  • string $message: Message to display. Default can be embedded with %s.
assertFieldValue (line 1212)

Tests the field value against the expectation.

  • return: True if pass
  • access: protected
boolean assertFieldValue (string $identifier, mixed $value, mixed $expected, string $message)
  • string $identifier: Name, ID or label.
  • mixed $value: Current field value.
  • mixed $expected: Expected value to match.
  • string $message: Failure message.
assertHeader (line 1324)

Checks each header line for the required value. If no value is given then only an existence check is made.

  • return: True if pass.
  • access: public
boolean assertHeader (string $header, [mixed $value = false], [ $message = '%s'])
  • string $header: Case insensitive header name.
  • mixed $value: Case sensitive trimmed string to match against. An expectation object can be used for pattern matching.
  • $message
assertImage (line 1002)

Checks for a valid image with atht alt text or title.

  • return: True if click target.
  • access: public
boolean assertImage (string $label, [ $message = '%s'])
  • string $label: Visible text.
  • $message
assertLink (line 1053)

Tests for the presence of a link label. Match is case insensitive with normalised space.

  • return: True if link present.
  • access: public
boolean assertLink (string $label, [mixed $expected = true], [string $message = '%s'])
  • string $label: Text between the anchor tags.
  • mixed $expected: Expected URL or expectation object.
  • string $message: Message to display. Default can be embedded with %s.
assertLinkById (line 1089)

Tests for the presence of a link id attribute.

  • return: True if link present.
  • access: public
boolean assertLinkById (string $id, [mixed $expected = true], [string $message = '%s'])
  • string $id: Id attribute value.
  • mixed $expected: Expected URL or expectation object.
  • string $message: Message to display. Default can be embedded with %s.
assertMime (line 1252)

Checks the mime type against a list of possible values.

  • return: True if pass.
  • access: public
boolean assertMime (array $types, [string $message = '%s'])
  • array $types: Possible mime types for a pass.
  • string $message: Message to display.
assertNoAuthentication (line 1291)

Checks that no authentication is necessary to view the desired page.

  • return: True if pass.
  • access: public
boolean assertNoAuthentication ([string $message = '%s'])
  • string $message: Message to display.
assertNoCookie (line 1454)

Checks that no cookie is present or that it has been successfully cleared.

  • return: True if pass.
  • access: public
boolean assertNoCookie (string $name, [string $message = '%s'])
  • string $name: Name of cookie to test.
  • string $message: Message to display.
assertNoHeader (line 1340)

Confirms that the header type has not been received.

Only the landing page is checked. If you want to check redirect pages, then you should limit redirects so as to capture the page you want.

  • return: True if pass.
  • access: public
boolean assertNoHeader (string $header, [ $message = '%s'])
  • string $header: Case insensitive header name.
  • $message
assertNoLink (line 1074)

Tests for the non-presence of a link label. Match is case insensitive with normalised space.

  • return: True if link missing.
  • access: public
boolean assertNoLink (string/integer $label, [string $message = '%s'])
  • string/integer $label: Text between the anchor tags or ID attribute.
  • string $message: Message to display. Default can be embedded with %s.
assertNoLinkById (line 1109)

Tests for the non-presence of a link label. Match is case insensitive with normalised space.

  • return: True if link missing.
  • access: public
boolean assertNoLinkById (string $id, [string $message = '%s'])
  • string $id: Id attribute value.
  • string $message: Message to display. Default can be embedded with %s.
assertNoPattern (line 1416)

Will trigger a pass if the perl regex pattern is not present in raw content.

  • return: True if pass.
  • access: public
boolean assertNoPattern (string $pattern, [string $message = '%s'])
  • string $pattern: Perl regex to look for including the regex delimiters.
  • string $message: Message to display.
assertNotEqual (line 1514)

Will trigger a pass if the two parameters have a different value. Otherwise a fail. This is for testing hand extracted text, etc.

  • return: True on pass
  • access: public
boolean assertNotEqual (mixed $first, mixed $second, [string $message = '%s'])
  • mixed $first: Value to compare.
  • mixed $second: Value to compare.
  • string $message: Message to display.
assertNoText (line 1384)

Will trigger a pass if the text is not found in the plain text form of the page.

  • return: True if pass.
  • access: public
boolean assertNoText (string $text, [string $message = '%s'])
  • string $text: Text to look for.
  • string $message: Message to display.
assertPattern (line 1400)

Will trigger a pass if the Perl regex pattern is found in the raw content.

  • return: True if pass.
  • access: public
boolean assertPattern (string $pattern, [string $message = '%s'])
  • string $pattern: Perl regex to look for including the regex delimiters.
  • string $message: Message to display.
assertRealm (line 1304)

Attempts to match the current security realm.

  • return: True if pass.
  • access: public
boolean assertRealm (string $realm, [string $message = '%s'])
  • string $realm: Name of security realm.
  • string $message: Message to display.
assertResponse (line 1236)

Checks the response code against a list of possible values.

  • return: True if pass.
  • access: public
boolean assertResponse (array $responses, [string $message = '%s'])
  • array $responses: Possible responses for a pass.
  • string $message: Message to display. Default can be embedded with %s.
assertSubmit (line 937)

Checks for a valid button label.

  • return: True if click target.
  • access: public
boolean assertSubmit (string $label, [ $message = '%s'])
  • string $label: Visible text.
  • $message
assertText (line 1369)

Will trigger a pass if the text is found in the plain text form of the page.

  • return: True if pass.
  • access: public
boolean assertText (string $text, [string $message = '%s'])
  • string $text: Text to look for.
  • string $message: Message to display.
assertTitle (line 1354)

Tests the text between the title tags.

  • return: True if pass.
  • access: public
boolean assertTitle ([string/SimpleExpectation $title = false], [string $message = '%s'])
  • string/SimpleExpectation $title: Expected title.
  • string $message: Message to display.
assertTrue (line 1469)

Called from within the test methods to register passes and failures.

  • return: True on pass
  • access: public
boolean assertTrue (boolean $result, [string $message = false])
  • boolean $result: Pass on true.
  • string $message: Message to display describing the test state.
authenticate (line 799)

Retries a request after setting the authentication for the current realm.

  • return: HTML on successful fetch. Note that authentication may still have failed.
  • access: public
boolean/string authenticate (string $username, string $password)
  • string $username: Username for realm.
  • string $password: Password for realm.
back (line 774)

Equivalent to hitting the back button on the browser.

  • return: True if history entry and fetch succeeded.
  • access: public
boolean back ()
before (line 453)

Announces the start of the test.

  • access: public
void before (string $method)
  • string $method: Test method just started.

Redefinition of:
SimpleTestCase::before()
Announces the start of the test.
clearFrameFocus (line 864)

Clears the frame focus. All frames will be searched for content.

  • access: public
void clearFrameFocus ()
click (line 875)

Clicks a visible text item. Will first try buttons, then links and then images.

  • return: Raw page or false.
  • access: public
string/boolean click (string $label)
  • string $label: Visible text or alt text.
clickImage (line 956)

Clicks the submit image by some kind of label. Usually

the alt tag or the nearest equivalent. The owning form will be submitted by this. Clicking outside of the boundary of the coordinates will result in a failure.

  • return: Page on success.
  • access: public
boolean/string clickImage (string $label, [integer $x = 1], [integer $y = 1], [hash $additional = false])
  • string $label: Alt attribute of button.
  • integer $x: X-coordinate of imaginary click.
  • integer $y: Y-coordinate of imaginary click.
  • hash $additional: Additional form values.
clickImageById (line 991)

Clicks the submit image by ID attribute. The owning form will be submitted by this. Clicking outside of the boundary of the coordinates will result in a failure.

  • return: Page on success.
  • access: public
boolean/string clickImageById (integer/string $id, [integer $x = 1], [integer $y = 1], [hash $additional = false])
  • integer/string $id: ID attribute of button.
  • integer $x: X-coordinate of imaginary click.
  • integer $y: Y-coordinate of imaginary click.
  • hash $additional: Additional form values.
clickImageByName (line 974)

Clicks the submit image by the name. Usually

the alt tag or the nearest equivalent. The owning form will be submitted by this. Clicking outside of the boundary of the coordinates will result in a failure.

  • return: Page on success.
  • access: public
boolean/string clickImageByName (string $name, [integer $x = 1], [integer $y = 1], [hash $additional = false])
  • string $name: Name attribute of button.
  • integer $x: X-coordinate of imaginary click.
  • integer $y: Y-coordinate of imaginary click.
  • hash $additional: Additional form values.
clickLink (line 1029)

Follows a link by name. Will click the first link found with this link text by default, or a later one if an index is given. Match is case insensitive with normalised space.

  • return: Page on success.
  • access: public
boolean/string clickLink (string $label, [integer $index = 0])
  • string $label: Text between the anchor tags.
  • integer $index: Link position counting from zero.
clickLinkById (line 1039)

Follows a link by id attribute.

  • return: Page on success.
  • access: public
boolean/string clickLinkById (string $id)
  • string $id: ID attribute value.
clickSubmit (line 900)

Clicks the submit button by label. The owning form will be submitted by this.

  • return: Page on success, else false.
  • access: public
boolean/string clickSubmit ([string $label = 'Submit'], [hash $additional = false])
  • string $label: Button label. An unlabeled button can be triggered by 'Submit'.
  • hash $additional: Additional form values.
clickSubmitById (line 926)

Clicks the submit button by ID attribute. The owning form will be submitted by this.

  • return: Page on success.
  • access: public
boolean/string clickSubmitById (string $id, [hash $additional = false])
  • string $id: ID attribute of button.
  • hash $additional: Additional form values.
clickSubmitByName (line 913)

Clicks the submit button by name attribute. The owning form will be submitted by this.

  • return: Page on success.
  • access: public
boolean/string clickSubmitByName (string $name, [hash $additional = false])
  • string $name: Name attribute of button.
  • hash $additional: Additional form values.
createBrowser (line 514)

Creates a new default web browser object.

Will be cleared at the end of the test method.

  • return: New browser.
  • access: public
TestBrowser createBrowser ()
delete (line 740)

Fetches a page by a DELETE request

  • return: Raw page on success.
  • access: public
boolean/string delete (string $url, [hash $parameters = false])
  • string $url: URL to fetch.
  • hash $parameters: Optional additional parameters.
failOnError (line 632)

Issues a fail if there is a transport error anywhere in the current frameset. Only one such error is reported.

  • return: Passes through result.
  • access: protected
string/boolean failOnError (string/boolean $result)
  • string/boolean $result: HTML or failure.
forward (line 785)

Equivalent to hitting the forward button on the browser.

  • return: True if history entry and fetch succeeded.
  • access: public
boolean forward ()
get (line 699)

Fetches a page into the page buffer. If there is no base for the URL then the current base URL is used. After the fetch the base URL reflects the new location.

  • return: Raw page on success.
  • access: public
boolean/string get (string $url, [hash $parameters = false])
  • string $url: URL to fetch.
  • hash $parameters: Optional additional GET data.
getAssertionLine (line 1527)

Uses a stack trace to find the line of an assertion.

  • return: Line number of first assert* method embedded in format string.
  • access: public
string getAssertionLine ()

Redefinition of:
SimpleTestCase::getAssertionLine()
Uses a stack trace to find the line of an assertion.
getBrowser (line 475)

Gets a current browser reference for setting special expectations or for detailed examination of page fetches.

  • return: Current test browser object.
  • access: public
SimpleBrowser getBrowser ()
getCookie (line 810)

Gets the cookie value for the current browser context.

  • return: Value of cookie or false if unset.
  • access: public
string getCookie (string $name)
  • string $name: Name of cookie.
getFrameFocus (line 835)

Accessor for current frame focus. Will be false if no frame has focus.

  • return: Label if any, otherwise the position in the frameset or false if none.
  • access: public
integer/string/boolean getFrameFocus ()
getTransportError (line 523)

Gets the last response error.

  • return: Last low level HTTP error.
  • access: public
string getTransportError ()
getUrl (line 533)

Accessor for the currently selected URL.

  • return: Current location or false if no page yet fetched.
  • access: public
string getUrl ()
head (line 753)

Does a HTTP HEAD fetch, fetching only the page headers. The current base URL is unchanged by this.

  • return: True on success.
  • access: public
boolean head (string $url, [hash $parameters = false])
  • string $url: URL to fetch.
  • hash $parameters: Optional additional GET data.
ignoreCookies (line 610)

Switches off cookie sending and recieving.

  • access: public
void ignoreCookies ()
ignoreErrors (line 620)

Skips errors for the next request only. You might want to confirm that a page is unreachable for example.

  • access: public
void ignoreErrors ()
ignoreFrames (line 602)

Disables frames support. Frames will not be fetched and the frameset page will be used instead.

  • access: public
void ignoreFrames ()
post (line 714)

Fetches a page by POST into the page buffer.

If there is no base for the URL then the current base URL is used. After the fetch the base URL reflects the new location.

  • return: Raw page on success.
  • access: public
boolean/string post (string $url, [mixed $parameters = false], [string $content_type = false])
  • string $url: URL to fetch.
  • mixed $parameters: Optional POST parameters or content body to send
  • string $content_type: Content type of provided body
put (line 729)

Fetches a page by PUT into the page buffer.

If there is no base for the URL then the current base URL is used. After the fetch the base URL reflects the new location.

  • return: Raw page on success.
  • access: public
boolean/string put (string $url, [mixed $body = false], [string $content_type = false])
  • string $url: URL to fetch.
  • mixed $body: Optional content body to send
  • string $content_type: Content type of provided body
restart (line 580)

Simulates the closing and reopening of the browser.

Temporary cookies will be discarded and timed cookies will be expired if later than the specified time.

  • access: public
void restart ([string/integer $date = false])
  • string/integer $date: Time when session restarted. If ommitted then all persistent cookies are kept. Time is either Cookie format string or timestamp.
retry (line 763)

Equivalent to hitting the retry button on the browser. Will attempt to repeat the page fetch.

  • return: True if fetch succeeded.
  • access: public
boolean retry ()
setBrowser (line 486)

Gets a current browser reference for setting special expectations or for detailed examination of page fetches.

  • access: public
void setBrowser (SimpleBrowser $browser)
setConnectionTimeout (line 672)

Sets the socket timeout for opening a connection and receiving at least one byte of information.

  • access: public
void setConnectionTimeout (integer $timeout)
  • integer $timeout: Maximum time in seconds.
setCookie (line 823)

Sets a cookie in the current browser.

  • access: public
void setCookie (string $name, string $value, [string $host = false], [string $path = '/'], [string $expiry = false])
  • string $name: Name of cookie.
  • string $value: Cookie value.
  • string $host: Host upon which the cookie is valid.
  • string $path: Cookie path if not host wide.
  • string $expiry: Expiry date.
setField (line 1123)

Sets all form fields with that label, or name if there is no label attached.

  • return: True if field exists, otherwise false.
  • access: public
boolean setField ( $label, string $value, [ $position = false], string $name)
  • string $name: Name of field in forms.
  • string $value: New value of field.
  • $label
  • $position
setFieldById (line 1145)

Sets all form fields with that id.

  • return: True if field exists, otherwise false.
  • access: public
boolean setFieldById (string/integer $id, string $value)
  • string/integer $id: Id of field in forms.
  • string $value: New value of field.
setFieldByName (line 1134)

Sets all form fields with that name.

  • return: True if field exists, otherwise false.
  • access: public
boolean setFieldByName (string $name, string $value, [ $position = false])
  • string $name: Name of field in forms.
  • string $value: New value of field.
  • $position
setFrameFocus (line 855)

Sets the focus by name.

  • return: True if frame exists.
  • access: public
boolean setFrameFocus (string $name)
  • string $name: Chosen frame.
setFrameFocusByIndex (line 845)

Sets the focus by index. The integer index starts from 1.

  • return: True if frame exists.
  • access: public
boolean setFrameFocusByIndex (integer $choice)
  • integer $choice: Chosen frame.
setMaximumRedirects (line 658)

Sets the maximum number of redirects before the web page is loaded regardless.

  • access: public
void setMaximumRedirects (integer $max)
  • integer $max: Maximum hops.
setParser (line 495)

Sets the HTML parser to use within this browser.

void setParser (object The $parser)
  • object The $parser: parser, one of SimplePHPPageBuilder or SimpleTidyPageBuilder.
showHeaders (line 549)

Dumps the current HTTP headers for debugging.

  • access: public
void showHeaders ()
showRequest (line 541)

Dumps the current request for debugging.

  • access: public
void showRequest ()
showSource (line 557)

Dumps the current HTML source for debugging.

  • access: public
void showSource ()
showText (line 565)

Dumps the visible text only for debugging.

  • access: public
void showText ()
submitFormById (line 1015)

Submits a form by the ID.

  • return: Page on success.
  • access: public
boolean/string submitFormById (string $id)
  • string $id: Form ID. No button information is submitted this way.
unsetBrowser (line 504)

Clears the current browser reference to help the PHP garbage collector.

  • access: public
void unsetBrowser ()
useProxy (line 685)

Sets proxy to use on all requests for when testing from behind a firewall. Set URL to false to disable.

  • access: public
void useProxy (string $proxy, [string $username = false], [string $password = false])
  • string $proxy: Proxy URL.
  • string $username: Proxy username for authentication.
  • string $password: Proxy password for authentication.

Inherited Methods

Inherited From SimpleTestCase

 SimpleTestCase::__construct()
 SimpleTestCase::after()
 SimpleTestCase::assert()
 SimpleTestCase::before()
 SimpleTestCase::createInvoker()
 SimpleTestCase::dump()
 SimpleTestCase::error()
 SimpleTestCase::exception()
 SimpleTestCase::fail()
 SimpleTestCase::getAssertionLine()
 SimpleTestCase::getLabel()
 SimpleTestCase::getSize()
 SimpleTestCase::getTests()
 SimpleTestCase::isTest()
 SimpleTestCase::pass()
 SimpleTestCase::run()
 SimpleTestCase::setUp()
 SimpleTestCase::shouldSkip()
 SimpleTestCase::signal()
 SimpleTestCase::skip()
 SimpleTestCase::skipIf()
 SimpleTestCase::skipUnless()
 SimpleTestCase::tearDown()
 SimpleTestCase::tell()

Documentation generated on Sun, 31 Oct 2010 16:33:04 -0500 by phpDocumentor 1.4.3