SimpleTest


SimpleTest\SimpleTestOptions
options.php at line 12

Class SimpleTestOptions

SimpleTestOptions

public class SimpleTestOptions

Static global directives and options.

Package SimpleTest.

Method Summary
void

addPartialMockCode(string code)

Adds additional mock code.

string

getDefaultProxy()

Accessor for default proxy host.

string

getDefaultProxyPassword()

Accessor for default proxy password.

string

getDefaultProxyUsername()

Accessor for default proxy username.

static string

getMockBaseClass()

Accessor for the currently set mock base class.

string

getPartialMockCode()

Accessor for additional partial mock code.

static string

getStubBaseClass()

Accessor for the currently set stub base class.

static string

getVersion()

Reads the SimpleTest version from the release file.

static void

ignore(string class)

Sets the name of a test case to ignore, usually because the class is an abstract case that should not be run.

static boolean

isIgnored(string class)

Test to see if a test case is in the ignore list.

static void

setMockBaseClass(string mock_base)

The base class name is settable here.

static void

setStubBaseClass(string stub_base)

The base class name is settable here.

void

useProxy(string proxy, string username, string password)

Sets proxy to use on all requests for when testing from behind a firewall.

Method Detail

options.php at line 112

addPartialMockCode

public void addPartialMockCode(string code)

Adds additional mock code.

Parameters:
code - Extra code that can be added to the partial mocks for extra functionality. Useful when a test tool has overridden the mock base classes.

options.php at line 149

getDefaultProxy

public string getDefaultProxy()

Accessor for default proxy host.

Returns:
Proxy URL.

options.php at line 169

getDefaultProxyPassword

public string getDefaultProxyPassword()

Accessor for default proxy password.

Returns:
Proxy password for authentication.

options.php at line 159

getDefaultProxyUsername

public string getDefaultProxyUsername()

Accessor for default proxy username.

Returns:
Proxy username for authentication.

options.php at line 98

getMockBaseClass

public static string getMockBaseClass()

Accessor for the currently set mock base class.

Returns:
Class name to inherit from.

options.php at line 122

getPartialMockCode

public string getPartialMockCode()

Accessor for additional partial mock code.

Returns:
Extra code.

options.php at line 72

getStubBaseClass

public static string getStubBaseClass()

Accessor for the currently set stub base class.

Returns:
Class name to inherit from.

options.php at line 20

getVersion

public static string getVersion()

Reads the SimpleTest version from the release file.

Returns:
Version string.

options.php at line 33

ignore

public static void ignore(string class)

Sets the name of a test case to ignore, usually because the class is an abstract case that should not be run.

Parameters:
class - Add a class to ignore.

options.php at line 46

isIgnored

public static boolean isIgnored(string class)

Test to see if a test case is in the ignore list.

Parameters:
class - Class name to test.
Returns:
True if should not be run.

options.php at line 87

setMockBaseClass

public static void setMockBaseClass(string mock_base)

The base class name is settable here. This is the class that a new mock will inherited from. To modify the generated mocks simply extend the SimpleMock class and set it's name with this method before any mocks are generated.

Parameters:
mock_base - Mock base class to use.

options.php at line 61

setStubBaseClass

public static void setStubBaseClass(string stub_base)

The base class name is settable here. This is the class that a new stub will inherited from. To modify the generated stubs simply extend the SimpleStub class and set it's name with this method before any stubs are generated.

Parameters:
stub_base - Server stub class to use.

options.php at line 137

useProxy

public void useProxy(string proxy, string username, string password)

Sets proxy to use on all requests for when testing from behind a firewall. Set host to false to disable. This will take effect if there are no other proxy settings.

Parameters:
proxy - Proxy host as URL.
username - Proxy username for authentication.
password - Proxy password for authentication.

SimpleTest