PHP 클래스 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); } ?>
저자: Sebastian Bergmann ([email protected])
상속: extends PHPUnit_Framework_Assert, implements PHPUnit_Framework_Test, implements PHPUnit_Framework_SelfDescribing
파일 보기 프로젝트 열기: phalcon/cphalcon 1 사용 예제들

공개 메소드들

메소드 설명
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 )

메소드 상세

assertCount() 공개 메소드

public assertCount ( $cnt, $a )

assertEmpty() 공개 메소드

public assertEmpty ( $v )

assertEquals() 공개 메소드

public assertEquals ( $a, $b )

assertFalse() 공개 메소드

public assertFalse ( $a )

assertGreaterThan() 공개 메소드

public assertGreaterThan ( $a, $b )

assertInstanceOf() 공개 메소드

public assertInstanceOf ( $className, $object )

assertInternalType() 공개 메소드

public assertInternalType ( $type, $value )

assertNotEquals() 공개 메소드

public assertNotEquals ( $a, $b )

assertTrue() 공개 메소드

public assertTrue ( $a )

main() 공개 정적인 메소드

public static main ( $className )

markTestSkipped() 공개 메소드

public markTestSkipped ( $message )