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

Class: PHPUnit2_Extensions_TestDecorator

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

Class Overview

PHPUnit2_Framework_Assert
   |
   --PHPUnit2_Extensions_TestDecorator

A Decorator for Tests.


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2002-2006 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::anything()
PHPUnit2_Framework_Assert::arrayContains()
PHPUnit2_Framework_Assert::arrayHasKey()
PHPUnit2_Framework_Assert::assertArrayHasKey()
Asserts that an array has a specified key.
PHPUnit2_Framework_Assert::assertArrayNotHasKey()
Asserts that an array does not have a specified key.
PHPUnit2_Framework_Assert::assertContains()
Asserts that a haystack contains a needle.
PHPUnit2_Framework_Assert::assertEquals()
Asserts that two variables are equal.
PHPUnit2_Framework_Assert::assertFalse()
Asserts that a condition is false.
PHPUnit2_Framework_Assert::assertFileExists()
Asserts that a file exists.
PHPUnit2_Framework_Assert::assertFileNotExists()
Asserts that a file does not exist.
PHPUnit2_Framework_Assert::assertHasProperty()
Asserts that an object has a specified property.
PHPUnit2_Framework_Assert::assertNotContains()
Asserts that a haystack does not contain a needle.
PHPUnit2_Framework_Assert::assertNotEquals()
Asserts that two variables are not equal.
PHPUnit2_Framework_Assert::assertNotHasProperty()
Asserts that an object does not have a specified property.
PHPUnit2_Framework_Assert::assertNotNull()
Asserts that a variable is not NULL.
PHPUnit2_Framework_Assert::assertNotRegExp()
Asserts that a string does not match a given regular expression.
PHPUnit2_Framework_Assert::assertNotSame()
Asserts that two variables do not have the same type and value.
PHPUnit2_Framework_Assert::assertNotType()
Asserts that a variable is not of a given type.
PHPUnit2_Framework_Assert::assertNull()
Asserts that a variable is NULL.
PHPUnit2_Framework_Assert::assertRegExp()
Asserts that a string matches a given regular expression.
PHPUnit2_Framework_Assert::assertSame()
Asserts that two variables have the same type and value.
PHPUnit2_Framework_Assert::assertThat()
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::equalTo()
PHPUnit2_Framework_Assert::fail()
Fails a test with the given message.
PHPUnit2_Framework_Assert::failConstraint()
Fails a test based on a failed constraint.
PHPUnit2_Framework_Assert::fileExists()
PHPUnit2_Framework_Assert::getNonPublicProperty()
Returns the value of an object's property that is declared protected or private.
PHPUnit2_Framework_Assert::greaterThan()
PHPUnit2_Framework_Assert::hasProperty()
PHPUnit2_Framework_Assert::identicalTo()
PHPUnit2_Framework_Assert::isInstanceOf()
PHPUnit2_Framework_Assert::isType()
PHPUnit2_Framework_Assert::lessThan()
PHPUnit2_Framework_Assert::logicalAnd()
Logical AND.
PHPUnit2_Framework_Assert::logicalNot()
Logical NOT.
PHPUnit2_Framework_Assert::logicalOr()
Logical OR.
PHPUnit2_Framework_Assert::markTestIncomplete()
Mark the test as incomplete.
PHPUnit2_Framework_Assert::markTestSkipped()
Mark the test as skipped.
PHPUnit2_Framework_Assert::matchesRegularExpression()
PHPUnit2_Framework_Assert::stringContains()

Class Details

[line 70]
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 78]

The Test to be decorated.
  • Access: protected

Type:   object


[ Top ]



Method Detail

__construct (Constructor)   [line 86]

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 109]

void basicRun( PHPUnit2_Framework_TestResult $result)

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

Parameters:

PHPUnit2_Framework_TestResult   $result   — 

[ Top ]

count   [line 121]

integer count( )

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

Overridden in child classes as:

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

[ Top ]

createResult   [line 132]

PHPUnit2_Framework_TestResult createResult( )

Creates a default TestResult object.
  • Access: protected

[ Top ]

getTest   [line 143]

PHPUnit2_Framework_Test getTest( )

Returns the test to be run.
  • Access: public

[ Top ]

run   [line 157]

PHPUnit2_Framework_TestResult run( [PHPUnit2_Framework_TestResult $result = NULL])

Runs the decorated test and collects the result in a TestResult.
  • Throws: InvalidArgumentException
  • 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 97]

string toString( )

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

[ Top ]


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