Constructor.
Parameters:
API Tags:
void addFixture(
string
$name, [string
$database = "default"]
)
|
|
Adds the given fixture to the given database.
Parameters:
|
string |
$name: |
fixture name |
|
string |
$database: |
database name |
void addFixtures(
array
$names, [string
$database = "default"]
)
|
|
Adds the given fixtures to the given database.
Parameters:
|
array |
$names: |
fixture names |
|
string |
$database: |
database name |
void assertAttributeHasFlag(
atkNodeType
$node, string
$attribName, string
$flagName
)
|
|
Asserts if a certain attribute in the given node has the given flag.
You should pass the flag name to this method!
Parameters:
|
atkNodeType |
$node: |
|
|
string |
$attribName: |
|
|
string |
$flagName: |
|
void assertAttributeNotHasFlag(
atkNodeType
$node, string
$attribName, string
$flagName
)
|
|
Asserts if a certain attribute in the given node doesn't have the given flag.
You should pass the flag name to this method!
Parameters:
|
atkNodeType |
$node: |
|
|
string |
$attribName: |
|
|
string |
$flagName: |
|
void assertNoValidationError(
array
$record, mixed
$attribName, string
$error
)
|
|
Asserts the given attribute(s) value did not cause the given validation error.
$attribName can contain the name of a single attributename, or an array with attributenames.
Parameters:
|
array |
$record: |
|
|
mixed |
$attribName: |
|
|
string |
$error: |
|
void assertValidationError(
array
$record, mixed
$attribName, string
$error
)
|
|
Asserts the given attribute(s) value caused the given validation error.
$attribName can contain the name of a single attributename, or an array with attributenames.
Parameters:
|
array |
$record: |
|
|
mixed |
$attribName: |
|
|
string |
$error: |
|
array fixture(
string
$table, [string
$name = NULL], [
$database = NULL]
)
|
|
Returns the fixture for the given table name with the given name.
If the fixture doesn't exist NULL is returned. If no database is specified all databases will be searched. If no name is specified all fixtures for the given table will be returned.
Parameters:
|
string |
$table: |
table name |
|
string |
$name: |
fixture name |
|
|
$database: |
|
API Tags:
void restoreDb(
[
$conn = NULL]
)
|
|
Parameters:
void restoreNode(
$nodename
)
|
|
Parameters:
void restoreSecurityManager(
)
|
|
void setMockDb(
[
$conn = NULL]
)
|
|
Parameters:
void &setMockNode(
$nodename,
&$mocknode
)
|
|
Parameters:
void &setMockSecurityManager(
&$mockmanager
)
|
|
Parameters:
Called before each test method to setup some
data etc. By default this means the fixture data will be loaded into the test database. Make sure you call the parent if you override this method!
API Tags:
Redefined in descendants as:
void setUpTestDatabase(
)
|
|
Set-up test database data.
API Tags:
Called after each test method. By default this
means the fixture data and any other data added to the database will be removed from the test database. Make sure you call the parent if you override this method!
Redefined in descendants as:
Get path for this test-case.
API Tags:
| Return: | the path for this test-case |
void &_getTestDb(
$database
)
|
|
Get test database.
Parameters:
void _hasValidationError(
array
$record, mixed
$attribName, string
$error
)
|
|
Asserts the given attribute(s) value did not cause the given validation error.
$attribName can contain the name of a single attributename, or an array with attributenames.
Parameters:
|
array |
$record: |
|
|
mixed |
$attribName: |
|
|
string |
$error: |
|
boolean _validateTestDb(
)
|
|
Check if we have a test database for each database.
API Tags:
array __call(
string
$method, array
$args
)
|
|
Override __call to intercept method calls for fixture data.
This makes it possible to access fixtures if there is a method with the same name as the table the fixture is defined for. Only works properly in PHP5.
Parameters:
|
string |
$method: |
method name (table name) |
|
array |
$args: |
method arguments |
API Tags: