Class Fixture

Description

FIT Fixture

  • version: 0.1.0

Located in /fit/Fixture.php (line 51)


	
			
Direct descendents
Class Description
 class ActionFixture FIT Fixture: ActionFixture
 class ColumnFixture FIT Fixture: ColumnFixture
 class PrimitiveFixture FIT Fixture
 class Summary FIT Fixture
 class Browser FIT Fixture
Class Constant Summary
 INCLUDE_DIR = PHPFIT_INCLUDE_DIR
Variable Summary
 object $counts
 mixed $gray
 mixed $green
 mixed $red
 array $summary
 mixed $yellow
Method Summary
 Fixture __construct ()
 string camel (string $string)
 void check (Parse $cell, TypeAdapter $a)
 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)
 void fixBoolToString (mixed $result)
 Parse fixtureName (Parse $tables)
 string getType (mixed $name)
 void ignore (Parse $cell)
 void info (Parse $cell, string $message)
 string infoS (string $message)
 void interpretTables (Parse $tables)
 string label (string $string)
 object Fixture loadFixture (string $fixtureName)
 mixed parse (string $s, string $type)
 void right (Parse $cell)
 void wrong (Parse $cell, [string $actual = false])
Variables
object $counts (line 75)

count what?

  • access: public
mixed $gray = "#efefef" (line 62)
  • access: protected
mixed $green = "#cfffcf" (line 59)
  • access: protected
mixed $red = "#ffcfcf" (line 60)
  • access: protected
array $summary = array() (line 69)

collecting information of this fixture

  • access: public
mixed $yellow = "#ffffcf" (line 61)
  • access: protected
Methods
Constructor __construct (line 82)

construtor

instanciate counter

Fixture __construct ()

Redefined in descendants as:
camel (line 126)

CamelCaseString

  • static:
  • access: public
  • todo: This looks quite fragile - consider using preg_replace
string camel (string $string)
  • string $string
check (line 300)
  • access: public
void check (Parse $cell, TypeAdapter $a)

Redefined in descendants as:
doCell (line 243)

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 217)

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 200)
  • access: public
void doRow (Parse $row)

Redefined in descendants as:
doRows (line 186)
  • access: public
void doRows (Parse $rows)

Redefined in descendants as:
doTable (line 179)
  • access: public
void doTable (Parse $table)

Redefined in descendants as:
doTables (line 93)

Traverse all tables

Tables are packed in Parse-objects

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

place an error text into a cell

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

transform an exception to a cell error

void exception (object $cell, object $e)
  • object $cell: Parse object
  • object $e: Exception
fixBoolToString (line 334)
  • access: public
void fixBoolToString (mixed $result)
fixtureName (line 252)
  • access: public
Parse fixtureName (Parse $tables)
getLinkedFixtureWithArgs (line 261)
  • access: protected
Fixture getLinkedFixtureWithArgs (Parse $tables)
getType (line 480)

receive member variable's type specification

Use the helper property typeDict to figure out what type a variable 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 (mixed $name)
ignore (line 432)
  • access: public
void ignore (Parse $cell)
info (line 413)
  • access: public
void info (Parse $cell, string $message)
  • Parse $cell: cell
  • string $message: message
infoS (line 424)
  • access: public
string infoS (string $message)
  • string $message: message
interpretFollowingTables (line 158)
  • access: private
void interpretFollowingTables (Parse $tables)
interpretTables (line 142)

Work on tables

  • access: protected
void interpretTables (Parse $tables)
label (line 443)
  • access: public
string label (string $string)
  • string $string: string
loadFixture (line 279)

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 Simulator. The path name is realtive to the basic fixture di

  • access: public
object Fixture loadFixture (string $fixtureName)
  • string $fixtureName: fixtureName
parse (line 373)
  • return: (object or string)
  • access: public
mixed parse (string $s, string $type)
  • string $s: s
  • string $type: type
right (line 389)
  • access: public
void right (Parse $cell)
wrong (line 399)
  • access: public
void wrong (Parse $cell, [string $actual = false])
  • Parse $cell: cell
  • string $actual: actual
Class Constants
INCLUDE_DIR = PHPFIT_INCLUDE_DIR (line 57)

make the include folder available for user's fixtures

Documentation generated on Sun, 02 Apr 2006 16:01:04 +0200 by phpDocumentor 1.3.0RC5