Class mr_fixture_manager

Description

MR Fixture Manager

This class helps to manage fixture objects by giving you a place to store your fixtures.

Also, this class helps to delete all of your created fixtures.

  • author: Mark Nielsen

Located in /fixture/manager.php (line 38)


	
			
Variable Summary
static mr_fixture_manager[] $instances
mr_fixture_interface[] $fixtures
Method Summary
static void tearDown ()
mr_fixture_manager __construct ()
void destroy ()
mr_fixture_interface get (string $name)
bool has (string $name)
\mr_fixture_manager set (string $name, mr_fixture_interface $fixture)
Variables
static mr_fixture_manager $instance (line 42)
  • access: protected
static mr_fixture_manager[] $instances = array() (line 47)
  • access: protected
mr_fixture_interface[] $fixtures = array() (line 52)
  • access: protected
Methods
static instance (line 62)

A single static instance, helpful for unit tests when you just need a single instance that's easily accessible.

  • access: public
static mr_fixture_manager instance ()
static tearDown (line 139)

Convenience method for unit tests, call in your tearDown method to delete all of the fixtures from all fixture managers you may have created.

  • access: public
static void tearDown ()
Constructor __construct (line 72)

Registers itself with all known instances

  • access: public
mr_fixture_manager __construct ()
destroy (line 125)

Delete all fixtures

void destroy ()
get (line 103)

Get a fixture instance by name

  • throws: coding_exception
  • access: public
mr_fixture_interface get (string $name)
  • string $name: The unique name for the fixture
has (line 116)

Determine if a fixture with a specific name exists

  • access: public
bool has (string $name)
  • string $name: The unique name for the fixture
set (line 87)

Set a fixture instance by name and builds the fixture

The name is used to later retrieve your fixture.

\mr_fixture_manager set (string $name, mr_fixture_interface $fixture)

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