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
Variable Summary
Method Summary
 WebTestCase WebTestCase ([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 assertHeader (string $header, [mixed $value = false], [ $message = '%s'])
 void assertHeaderPattern ( $header,  $pattern, [ $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'])
 void assertNoUnwantedHeader ( $header, [ $message = '%s'])
 void assertNoUnwantedPattern ( $pattern, [ $message = '%s'])
 void assertNoUnwantedText ( $text, [ $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])
 void assertWantedPattern ( $pattern, [ $message = '%s'])
 void assertWantedText ( $text, [ $message = '%s'])
 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 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, [hash $parameters = false])
 void restart ([string/integer $date = false])
 boolean retry ()
 void setBrowser ( &$browser, 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 showHeaders ()
 void showRequest ()
 void showSource ()
 void showText ()
 boolean/string submitFormById (string $id)
 void unsetBrowser ()
 void useProxy (string $proxy, [string $username = false], [string $password = false])
 boolean _assertFieldValue (string $identifier, mixed $value, mixed $expected, string $message)
Variables
mixed $_browser (line 434)
mixed $_ignore_errors = false (line 435)

Inherited Variables

Inherited from SimpleTestCase

SimpleTestCase::$_label
SimpleTestCase::$_observers
SimpleTestCase::$_reporter
SimpleTestCase::$_should_skip
Methods
Constructor WebTestCase (line 444)

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

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

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 585)

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 1232)

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 849)

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 1442)

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 1506)

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 1492)

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 1126)

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 1162)

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 1144)

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.
assertHeader (line 1288)

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
assertHeaderPattern (line 1298)
  • deprecated:
void assertHeaderPattern ( $header,  $pattern, [ $message = '%s'])
  • $header
  • $pattern
  • $message
assertImage (line 966)

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 1017)

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 1053)

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 1216)

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 1255)

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 1463)

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 1314)

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 1038)

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 1073)

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 1418)

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 1523)

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 1372)

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.
assertNoUnwantedHeader (line 1324)
  • deprecated:
void assertNoUnwantedHeader ( $header, [ $message = '%s'])
  • $header
  • $message
assertNoUnwantedPattern (line 1428)
  • deprecated:
void assertNoUnwantedPattern ( $pattern, [ $message = '%s'])
  • $pattern
  • $message
assertNoUnwantedText (line 1382)
  • deprecated:
void assertNoUnwantedText ( $text, [ $message = '%s'])
  • $text
  • $message
assertPattern (line 1395)

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 1268)

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 1200)

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 901)

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 1350)

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 1335)

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 1478)

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.
assertWantedPattern (line 1405)
  • deprecated:
void assertWantedPattern ( $pattern, [ $message = '%s'])
  • $pattern
  • $message
assertWantedText (line 1360)
  • deprecated:
void assertWantedText ( $text, [ $message = '%s'])
  • $text
  • $message
authenticate (line 763)

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 738)

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 828)

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

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

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 920)

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 955)

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 938)

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 993)

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)
  • string $label: Text between the anchor tags.
  • integer $index: Link position counting from zero.
clickLinkById (line 1003)

Follows a link by id attribute.

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

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 890)

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 877)

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 505)

Creates a new default web browser object.

Will be cleared at the end of the test method.

  • return: New browser.
  • access: public
TestBrowser &createBrowser ()
forward (line 749)

Equivalent to hitting the forward button on the browser.

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

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 1536)

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 774)

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 799)

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 515)

Gets the last response error.

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

Accessor for the currently selected URL.

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

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 602)

Switches off cookie sending and recieving.

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

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 594)

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

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

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, [hash $parameters = false])
  • string $url: URL to fetch.
  • hash $parameters: Optional additional GET data.
restart (line 572)

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 727)

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 ( &$browser, SimpleBrowser $browser)
setConnectionTimeout (line 664)

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 787)

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 1087)

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 1109)

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 1098)

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 819)

Sets the focus by name.

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

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 650)

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

  • access: public
void setMaximumRedirects (integer $max)
  • integer $max: Maximum hops.
showHeaders (line 541)

Dumps the current HTTP headers for debugging.

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

Dumps the current request for debugging.

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

Dumps the current HTML source for debugging.

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

Dumps the visible text only for debugging.

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

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 495)

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

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

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.
_assertFieldValue (line 1176)

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.

Inherited Methods

Inherited From SimpleTestCase

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

Documentation generated on Sun, 04 May 2008 09:22:28 -0500 by phpDocumentor 1.3.0