Class: atkFixtureManager
Source Location: /fixture/class.atkfixturemanager.inc
Class atkFixtureManager
Method Summary
| static
string
|
getPath() |
Get the fixture path for the given fixture (full-)name. |
| atkFixtureLoader |
&getLoader() |
Get loader instance (by extension). |
| string |
getTable() |
Returns the fixture table for the given full fixture name. |
| string |
getType() |
Returns the fixture type for the given fixture path. |
| mixed |
load() |
Load data for the given fixture into the test database. |
| void |
save() |
Save fixture data to the database in the given table. |
Properties
Loader instances (by class name)
Loader class names by extension.
Methods
static string getPath(
string
$fullname, [string
$testCasePath = NULL]
)
|
|
Get the fixture path for the given fixture (full-)name.
Parameters:
|
string |
$fullname: |
full fixture name |
|
string |
$testCasePath: |
test case path |
API Tags:
Returns the only atkFixtureManager instance.
atkFixtureLoader &getLoader(
string
$extension
)
|
|
Get loader instance (by extension).
Parameters:
|
string |
$extension: |
fixture filename extension |
API Tags:
| Return: | fixture loader instance |
string getTable(
string
$fullname
)
|
|
Returns the fixture table for the given full fixture name.
Parameters:
|
string |
$fullname: |
full fixture name |
API Tags:
string getType(
string
$path
)
|
|
Returns the fixture type for the given fixture path.
Parameters:
|
string |
$path: |
fixture path |
API Tags:
mixed load(
string
$fullname,
&$database, [string
$searchPath = NULL], atkDb
$database
)
|
|
Load data for the given fixture into the test database.
Parameters:
|
string |
$fullname: |
full fixture name |
|
atkDb |
$database: |
database instance |
|
string |
$searchPath: |
search path (for fixtures without path/module specification) |
|
|
&$database: |
|
API Tags:
| Return: | if successful an array with fixture table and data else false |
| Access: | public |
void registerLoader(
string
$class, mixed
$extensions
)
|
|
Register fixture loader.
Parameters:
|
string |
$class: |
ATK class path |
|
mixed |
$extensions: |
array of extension names (without dot) this loader supports |
void save(
&$database, string
$table, array
$data, atkDb
$database
)
|
|
Save fixture data to the database in the given table.
Parameters:
|
atkDb |
$database: |
database instance |
|
string |
$table: |
table name |
|
array |
$data: |
fixture data |
|
|
&$database: |
|
API Tags: