Class PHPFIT_Fixture

Description

FIT Fixture

  • version: 0.1.0

Located in /Fixture.php (line 44)


	
			
Direct descendents
Class Description
 class PHPFIT_Fixture_Action FIT Fixture: ActionFixture
 class PHPFIT_Fixture_Primitive FIT Fixture: ActionFixture
 class PHPFIT_Fixture_Summary FIT Fixture
 class PHPFIT_Fixture_Column FIT Fixture: ColumnFixture
Variable Summary
 object $counts
 array $summary
Method Summary
 PHPFIT_Fixture __construct ()
 string camel (string $string)
 bool checkCell (mixed $cell, TypeAdapter $a, Parse $cell,)
 void doCell (object $cell)
 void doCells (object $cells)
 void doRow (Parse $row)
 void doRows (Parse $rows)
 void doTable (Parse $table)
 void doTables (Parse $tables)
 void error (object $cell, string $message)
 string escape (string $string)
 void exception (object $cell, object $e)
 string fixBoolToString (bool $bool)
 string fixtureName (parse $tables)
 object Fixture getLinkedFixtureWithArgs (Parse $tables)
 string getType (string $name, [bool $method = false])
 void ignore (Parse $cell)
 void info (Parse $cell, string $message)
 string infoS (string $message)
 string label (string $string)
 object Fixture loadFixture (string $fixtureName)
 mixed parse (string $s, string $type)
 mixed right (Parse $cell, string 1)
 void wrong (Parse $cell, [string $actual = false])
Variables
array $backgroundColor = array(
'passed' => '#cfffcf',
'failed' => '#ffcfcf',
'ignored' => '#efefef',
'error' => '#ffffcf',
)
(line 50)

make the include folder available for user's fixtures

  • access: protected
object $counts (line 67)

count what?

  • access: public
array $summary = array() (line 61)

collecting information of this fixture

  • access: public
Methods
Constructor __construct (line 74)

construtor

instanciate counter

PHPFIT_Fixture __construct ()
camel (line 530)

CamelCaseString auxiliary function

  • static:
  • access: public
  • todo: This looks quite fragile - consider using preg_replace
string camel (string $string)
  • string $string
checkCell (line 278)

check whether the value of a cell matches

  • return: true on success, false otherwise
  • access: public
bool checkCell (mixed $cell, TypeAdapter $a, Parse $cell,)
  • Parse $cell,
  • TypeAdapter $a

Redefined in descendants as:
doCell (line 189)

process a single cell

Generic processing of a table cell. Well, this function just ignores cells.

This method may be overwritten by a subclass (ColumnFixture)

  • access: public
void doCell (object $cell)
  • object $cell: A parse object

Redefined in descendants as:
doCells (line 164)

process cells

Generic processing of all upcoming cells. Actually, this method just iterates through them and delegates to doCell()

This method may be overwritten by a subclass (ActionFixture)

void doCells (object $cells)
  • object $cells: A parse object

Redefined in descendants as:
doRow (line 147)

iterate through cells

void doRow (Parse $row)
  • Parse $row

Redefined in descendants as:
doRows (line 132)

iterate through rows

void doRows (Parse $rows)
  • Parse $rows

Redefined in descendants as:
doTable (line 121)

iterate through table

void doTable (Parse $table)
  • Parse $table

Redefined in descendants as:
doTables (line 85)

Traverse all tables

Tables are packed in Parse-objects

  • access: public
void doTables (Parse $tables)
  • Parse $tables
error (line 371)

place an error text into a cell

  • access: public
void error (object $cell, string $message)
  • object $cell: Parse object
  • string $message
escape (line 468)
  • access: public
string escape (string $string)
  • string $string: string
exception (line 360)

transform an exception to a cell error

void exception (object $cell, object $e)
  • object $cell: Parse object
  • object $e: Exception
fixBoolToString (line 340)

convert a boolean value to corresponding string

  • return: "true" or "false"
  • access: public
string fixBoolToString (bool $bool)
  • bool $bool: a boolean value
fixtureName (line 200)

find the name of the fixture to be executed

  • return: of the fixure
  • access: public
string fixtureName (parse $tables)
  • parse $tables
getLinkedFixtureWithArgs (line 212)

get a fixture with arguments

object Fixture getLinkedFixtureWithArgs (Parse $tables)
  • Parse $tables: tables
getType (line 497)

receive member variable's type specification

Use the helper property typeDict to figure out what type a member variable or return value of a member function is

Type is one of:

  • integer
  • string
  • array
  • object
  • object:CLASSNAME
  • callable

  • access: public
  • todo: As PHP does automatica type conversation, I reckon this can be spared
string getType (string $name, [bool $method = false])
  • string $name: of property or method
  • bool $method: check for return type of method
ignore (line 448)
  • access: public
void ignore (Parse $cell)
  • Parse $cell: cell
info (line 428)
  • access: public
void info (Parse $cell, string $message)
  • Parse $cell: cell
  • string $message: message
infoS (line 440)
  • access: public
string infoS (string $message)
  • string $message: message
label (line 459)
  • access: public
string label (string $string)
  • string $string: string
loadFixture (line 234)

load a fixture by java-stylish name (dot-sparated)

A fixture name might be something like: eg.net.Simulator. This will load eg/net/Simulator.php and intanciates the clss eg_net_Simulator. The path name is realtive to the basic fixture dir.

It also supports loading standard fixtures. They are recognized by the prefix: "fit." Those fixtures are maped to the corresponding class.

  • access: public
object Fixture loadFixture (string $fixtureName)
  • string $fixtureName: fixtureName
parse (line 385)

parse value from cell

  • return: (object or string)
  • access: public
mixed parse (string $s, string $type)
  • string $s: s
  • string $type: type
right (line 400)

Add annotation to cell: right

  • return: (object or string)
  • access: public
mixed right (Parse $cell, string 1)
  • string 1: type
  • Parse $cell: c$ell
wrong (line 411)
  • access: public
void wrong (Parse $cell, [string $actual = false])
  • Parse $cell: cell
  • string $actual: actual

Documentation generated on Sun, 02 Apr 2006 23:21:38 +0000 by phpDocumentor 1.3.0RC5