cvs: pear(ZEND_ENGINE_2) /PHPUnit/Tests/Framework AssertTest.php
| From: | Sebastian Bergmann | Date: | Mon, 09 Jun 2003 16:45:32 +0000 |
| Subject: | cvs: pear(ZEND_ENGINE_2) /PHPUnit/Tests/Framework AssertTest.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-10809@lists.php.net to get a copy of this message | ||
sebastian Mon Jun 9 12:45:32 2003 EDT
Modified files: (Branch: ZEND_ENGINE_2)
/pear/PHPUnit/Tests/Framework AssertTest.php
Log:
Implement testFail(), testAssertEqualsNull() and testAssertStringEquals().
Index: pear/PHPUnit/Tests/Framework/AssertTest.php
diff -u pear/PHPUnit/Tests/Framework/AssertTest.php:1.1.2.1
pear/PHPUnit/Tests/Framework/AssertTest.php:1.1.2.2
--- pear/PHPUnit/Tests/Framework/AssertTest.php:1.1.2.1 Sun Jun 8 04:37:13 2003
+++ pear/PHPUnit/Tests/Framework/AssertTest.php Mon Jun 9 12:45:32 2003
@@ -12,12 +12,31 @@
// | license@php.net so we can mail you a copy immediately. |
// +------------------------------------------------------------------------+
//
-// $Id: AssertTest.php,v 1.1.2.1 2003/06/08 08:37:13 sebastian Exp $
+// $Id: AssertTest.php,v 1.1.2.2 2003/06/09 16:45:32 sebastian Exp $
//
require_once 'PHPUnit/Framework/TestCase.php';
class PHPUnit_Tests_Framework_AssertTest extends PHPUnit_Framework_TestCase {
+ public function testFail() {
+ try {
+ self::fail();
+ }
+
+ catch (PHPUnit_Framework_AssertionFailedError $e) {
+ return;
+ }
+
+ throw new PHPUnit_Framework_AssertionFailedError;
+ }
+
+ public function testAssertEqualsNull() {
+ $this->assertEquals(null, null);
+ }
+
+ public function testAssertStringEquals() {
+ $this->assertEquals('a', 'a');
+ }
}
/*