Moodle  2.2.1
http://www.collinsharper.com
test_recordset Class Reference
Inheritance diagram for test_recordset:
Collaboration diagram for test_recordset:

Public Member Functions

 __construct (array $table)
 __destruct ()
 current ()
 key ()
 next ()
 valid ()
 close ()

Protected Attributes

 $records

Detailed Description

Simple class that implements the moodle_recordset API based on an array of test data.

See the question_attempt_step_db_test class in question/engine/simpletest/testquestionattemptstep.php for an example of how this is used.

Definition at line 566 of file simpletestlib.php.


Constructor & Destructor Documentation

__construct ( array table)

Constructor

Parameters:
$tableas for testing_db_record_builder::build_db_records() but does not need a unique first column.

Definition at line 574 of file simpletestlib.php.

Definition at line 590 of file simpletestlib.php.

Here is the call graph for this function:


Member Function Documentation

close ( )

Did we reach the end?

Returns:
boolean Free resources and connections, recordset can not be used anymore.
void

Reimplemented from moodle_recordset.

Definition at line 614 of file simpletestlib.php.

Here is the caller graph for this function:

current ( )

Definition at line 594 of file simpletestlib.php.

Here is the caller graph for this function:

key ( )

Definition at line 598 of file simpletestlib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

next ( )

Definition at line 606 of file simpletestlib.php.

valid ( )

Definition at line 610 of file simpletestlib.php.

Here is the call graph for this function:


Field Documentation

$records [protected]

Definition at line 567 of file simpletestlib.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations