รายชื่อ class ที่ใช้ในการทำสอบของ phpunit

Software testing ความรู้ สำหรับ Tester ผู้ทดสอบ เป็นส่วนสำคัญในการ test โปรแกรม การ ทดสอบโปรแกรมมีความรู้แนะนำไว้ในหมวดนี้

Moderator: mindphp, ผู้ดูแลกระดาน

M027
PHP Super Hero Member
PHP Super Hero Member
โพสต์: 758
ลงทะเบียนเมื่อ: 08/06/2015 10:07 am

รายชื่อ class ที่ใช้ในการทำสอบของ phpunit

โพสต์ที่ยังไม่ได้อ่าน โดย M027 »

assertTrue($x) Fail if $x is false
assertFalse($x) Fail if $x is true
assertNull($x) Fail if $x is set
assertNotNull($x) Fail if $x not set
assertIsA($x, $t) Fail if $x is not the class or type $t
assertNotA($x, $t) Fail if $x is of the class or type $t
assertEqual($x, $y) Fail if $x == $y is false
assertNotEqual($x, $y) Fail if $x == $y is true
assertWithinMargin($x, $y, $m) Fail if abs($x - $y) < $m is false
assertOutsideMargin($x, $y, $m) Fail if abs($x - $y) < $m is true
assertIdentical($x, $y) Fail if $x == $y is false or a type mismatch
assertNotIdentical($x, $y) Fail if $x == $y is true and types match
assertReference($x, $y) Fail unless $x and $y are the same variable
assertClone($x, $y) Fail unless $x and $y are identical copies
assertPattern($p, $x) Fail unless the regex $p matches $x
assertNoPattern($p, $x) Fail if the regex $p matches $x
expectError($x) Fail if matching error does not occour
expectException($x) Fail if matching exception is not thrown
ignoreException($x) Swallows any upcoming matching exception
assert($e) Fail on failed expectation object $e

จาก : http://www.simpletest.org/en/unit_test_ ... ation.html
  • Similar Topics
    ตอบกลับ
    แสดง
    โพสต์ล่าสุด

ผู้ใช้งานขณะนี้

สมาชิกกำลังดูบอร์ดนี้: ไม่มีสมาชิกใหม่ และบุคลทั่วไป 60