PHP Class PHPUnit_Framework_TestCase

To define a TestCase 1) Implement a subclass of PHPUnit_Framework_TestCase. 2) Define instance variables that store the state of the fixture. 3) Initialize the fixture state by overriding setUp(). 4) Clean-up after a test by overriding tearDown(). Each test runs in its own fixture so there can be no side effects among test runs. Here is an example: value1 = 2; $this->value2 = 3; } } ?> For each test implement a method which interacts with the fixture. Verify the expected results with assertions specified by calling assert with a boolean. assertTrue($this->value1 + $this->value2 == 5); } ?>
Author: Sebastian Bergmann ([email protected])
Inheritance: extends PHPUnit_Framework_Assert, implements PHPUnit_Framework_Test, implements PHPUnit_Framework_SelfDescribing
Exibir arquivo Open project: phalcon/cphalcon Class Usage Examples

Public Methods

Method Description
assertCount ( $cnt, $a )
assertEmpty ( $v )
assertEquals ( $a, $b )
assertFalse ( $a )
assertGreaterThan ( $a, $b )
assertInstanceOf ( $className, $object )
assertInternalType ( $type, $value )
assertNotEquals ( $a, $b )
assertTrue ( $a )
main ( $className )
markTestSkipped ( $message )

Method Details

assertCount() public method

public assertCount ( $cnt, $a )

assertEmpty() public method

public assertEmpty ( $v )

assertEquals() public method

public assertEquals ( $a, $b )

assertFalse() public method

public assertFalse ( $a )

assertGreaterThan() public method

public assertGreaterThan ( $a, $b )

assertInstanceOf() public method

public assertInstanceOf ( $className, $object )

assertInternalType() public method

public assertInternalType ( $type, $value )

assertNotEquals() public method

public assertNotEquals ( $a, $b )

assertTrue() public method

public assertTrue ( $a )

main() public static method

public static main ( $className )

markTestSkipped() public method

public markTestSkipped ( $message )