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

Class: PHPUnit2_Extensions_TestDecorator

Source Location: /PHPUnit2-2.0.3/Extensions/TestDecorator.php

Class Overview

PHPUnit2_Framework_Assert
   |
   --PHPUnit2_Extensions_TestDecorator

A Decorator for Tests.


Author(s):

Copyright:

  • Copyright &copy; 2002-2004 Sebastian Bergmann <sb@sebastian-bergmann.de>

Variables

Methods


Child classes:

PHPUnit2_Extensions_TestSetup
A Decorator to set up and tear down additional fixture state.
PHPUnit2_Extensions_RepeatedTest
A Decorator that runs a test repeatedly.

Inherited Variables

Inherited Methods

Class: PHPUnit2_Framework_Assert

PHPUnit2_Framework_Assert::__construct()
Protect constructor since it is a static only class.
PHPUnit2_Framework_Assert::assertEquals()
Asserts that two variables are equal.
PHPUnit2_Framework_Assert::assertFalse()
Asserts that a condition is false.
PHPUnit2_Framework_Assert::assertNotNull()
Asserts that an object isn't null.
PHPUnit2_Framework_Assert::assertNotSame()
Asserts that two objects refer not to the same object.
PHPUnit2_Framework_Assert::assertNull()
Asserts that an object is null.
PHPUnit2_Framework_Assert::assertRegExp()
Asserts that a string matches a given regular expression.
PHPUnit2_Framework_Assert::assertSame()
Asserts that two objects refer to the same object.
PHPUnit2_Framework_Assert::assertTrue()
Asserts that a condition is true.
PHPUnit2_Framework_Assert::assertType()
Asserts that a variable is of a given type.
PHPUnit2_Framework_Assert::fail()
Fails a test with the given message.
PHPUnit2_Framework_Assert::format()
PHPUnit2_Framework_Assert::setLooselyTyped()

Class Details

[line 36]
A Decorator for Tests.

Use TestDecorator as the base class for defining new test decorators. Test decorator subclasses can be introduced to add behaviour before or after a test is run.



[ Top ]


Class Variables

$test =  null

[line 45]

The Test to be decorated.
  • Access: protected

Type:   object


[ Top ]



Method Detail

__construct (Constructor)   [line 56]

PHPUnit2_Extensions_TestDecorator __construct( PHPUnit2_Framework_Test $test)

Constructor.
  • Access: public

Overridden in child classes as:

PHPUnit2_Extensions_RepeatedTest::__construct()
Constructor.

Overrides PHPUnit2_Framework_Assert::__construct() (Protect constructor since it is a static only class.)

Parameters:

PHPUnit2_Framework_Test   $test   — 

[ Top ]

basicRun   [line 83]

void basicRun( PHPUnit2_Framework_TestResult $result)

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

Parameters:

PHPUnit2_Framework_TestResult   $result   — 

[ Top ]

countTestCases   [line 97]

integer countTestCases( )

Counts the number of test cases that will be run by this test.
  • Access: public

Overridden in child classes as:

PHPUnit2_Extensions_RepeatedTest::countTestCases()
Counts the number of test cases that will be run by this test.

[ Top ]

createResult   [line 110]

PHPUnit2_Framework_TestResult createResult( )

Creates a default TestResult object.
  • Access: protected

[ Top ]

getTest   [line 123]

PHPUnit2_Framework_Test getTest( )

Returns the test to be run.
  • Access: public

[ Top ]

run   [line 138]

PHPUnit2_Framework_TestResult run( [PHPUnit2_Framework_TestResult $result = null])

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

Overridden in child classes as:

PHPUnit2_Extensions_TestSetup::run()
Runs the decorated test and collects the result in a TestResult.
PHPUnit2_Extensions_RepeatedTest::run()
Runs the decorated test and collects the result in a TestResult.

Parameters:

PHPUnit2_Framework_TestResult   $result   — 

[ Top ]

toString   [line 69]

string toString( )

Returns a string representation of the test.
  • Access: public

[ Top ]


Documentation generated on Mon, 11 Mar 2019 13:55:58 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.