PHPUnit2
[ class tree: PHPUnit2 ] [ index: PHPUnit2 ] [ all elements ]

Class: PHPUnit2_Extensions_TestSetup

Source Location: /PHPUnit2-3.0.0alpha11/Extensions/TestSetup.php

Class Overview

PHPUnit2_Framework_Assert
   |
   --PHPUnit2_Extensions_TestDecorator
      |
      --PHPUnit2_Extensions_TestSetup

A Decorator to set up and tear down additional fixture state.


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2002-2006 Sebastian Bergmann <sb@sebastian-bergmann.de>

Methods


Child classes:

Inherited Variables

Inherited Methods

Class: PHPUnit2_Extensions_TestDecorator

PHPUnit2_Extensions_TestDecorator::basicRun()
Runs the test and collects the result in a TestResult.
PHPUnit2_Extensions_TestDecorator::count()
Counts the number of test cases that will be run by this test.
PHPUnit2_Extensions_TestDecorator::createResult()
Creates a default TestResult object.
PHPUnit2_Extensions_TestDecorator::getTest()
Returns the test to be run.
PHPUnit2_Extensions_TestDecorator::run()
Runs the decorated test and collects the result in a TestResult.
PHPUnit2_Extensions_TestDecorator::toString()
Returns a string representation of the test.
PHPUnit2_Extensions_TestDecorator::__construct()
Constructor.

Class: PHPUnit2_Framework_Assert

PHPUnit2_Framework_Assert::assertArrayHasKey()
Asserts that an array has a specified key.
PHPUnit2_Framework_Assert::__construct()
Protect constructor since it is a static only class.

Class Details

[line 69]
A Decorator to set up and tear down additional fixture state.

Subclass TestSetup and insert it into your tests when you want to set up additional state once before the tests are run.



[ Top ]


Method Detail

run   [line 80]

PHPUnit2_Framework_TestResult run( [mixed PHPUnit2_Framework_TestResult$result = NULL], PHPUnit2_Framework_TestResult $result)

Runs the decorated test and collects the result in a TestResult.
  • Access: public
  • Throws: InvalidArgumentException

Overrides PHPUnit2_Extensions_TestDecorator::run() (Runs the decorated test and collects the result in a TestResult.)

Parameters:

PHPUnit2_Framework_TestResult   $result     

[ Top ]

setUp   [line 134]

void setUp( )

Sets up the fixture. Override to set up additional fixture state.
  • Access: protected

Overridden in child classes as:

TornDown6::setUp()

[ Top ]

tearDown   [line 144]

void tearDown( )

Tears down the fixture. Override to tear down the additional fixture state.
  • Access: protected

Overridden in child classes as:

TornDown::tearDown()

[ Top ]


Documentation generated on Tue, 12 Sep 2006 09:38:04 -0400 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.