## Class mr_fixture_role

Description

MR Fixture Role

WARNING: This fixture is not like the others, it depends on the system default roles. Therefore, it does not actually create new roles nor does it delete any roles.

- author: Mark Nielsen

Located in /fixture/role.php (line 42)

    mr_fixture_abstract
       |
       --mr_fixture_role

Variable Summary
string $shortname
Method Summary
mr_fixture_role __construct ([string $shortname = 'student'])
void build ()
void destroy ()
boolean exists ()
string get_shortname ()
mr_fixture_role set_shortname (string $shortname)
Variables
string $shortname (line 46)

- access: protected

#### Inherited Variables

Inherited from mr_fixture_abstract

> mr_fixture_abstract::$results

Methods
Constructor __construct (line 53)

- access: public

mr_fixture_role __construct ([string $shortname = 'student'])

- string $shortname: Any of the standard shortnames, EG: coursecreator, editingteacher, frontpage, guest, manager, student, teacher, user

Redefinition of:

mr_fixture_abstract::__construct()

build (line 66)

Create the fixture

This method must be safe to call multiple times.

- throws: moodle_exception
- access: public

void build ()
destroy (line 82)

Delete the fixture

This method must be safe to call multiple times.

- throws: moodle_exception
- access: public

void destroy ()
exists (line 91)

Determine if the fixture exists

- access: public

boolean exists ()
get_shortname (line 111)

- access: public

string get_shortname ()
set_shortname (line 103)

- access: public

mr_fixture_role set_shortname (string $shortname)

- string $shortname

#### Inherited Methods

Inherited From mr_fixture_abstract

> mr_fixture_abstract::__construct()
> mr_fixture_abstract::get()
> mr_fixture_abstract::get_results()
> mr_fixture_abstract::set_results()

Documentation generated on Thu, 28 Jun 2012 16:33:51 -0700 by phpDocumentor 1.4.3