cvs: pear /PHPUnit2/Tests/Framework AssertTest.php
| From: | Sebastian Bergmann | Date: | Sat, 17 Apr 2004 19:42:59 +0000 |
| Subject: | cvs: pear /PHPUnit2/Tests/Framework AssertTest.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-18356@lists.php.net to get a copy of this message | ||
sebastian Sat Apr 17 15:42:59 2004 EDT
Modified files:
/pear/PHPUnit2/Tests/Framework AssertTest.php
Log:
Implement testAssertNullNotEqualsString(), testAssertStringNotEqualsNull(), and
testAssertNullNotEqualsNull().
http://cvs.php.net/diff.php/pear/PHPUnit2/Tests/Framework/AssertTest.php?r1=1.5&r2=1.6&ty=u
Index: pear/PHPUnit2/Tests/Framework/AssertTest.php
diff -u pear/PHPUnit2/Tests/Framework/AssertTest.php:1.5
pear/PHPUnit2/Tests/Framework/AssertTest.php:1.6
--- pear/PHPUnit2/Tests/Framework/AssertTest.php:1.5 Sat Apr 17 15:36:39 2004
+++ pear/PHPUnit2/Tests/Framework/AssertTest.php Sat Apr 17 15:42:59 2004
@@ -12,7 +12,7 @@
// | license@php.net so we can mail you a copy immediately. |
// +------------------------------------------------------------------------+
//
-// $Id: AssertTest.php,v 1.5 2004/04/17 19:36:39 sebastian Exp $
+// $Id: AssertTest.php,v 1.6 2004/04/17 19:42:59 sebastian Exp $
//
require_once 'PHPUnit2/Framework/TestCase.php';
@@ -54,22 +54,40 @@
$this->assertEquals('a', 'a');
}
- /**
- * @todo Implement testAssertNullNotEqualsString().
- */
public function testAssertNullNotEqualsString() {
+ try {
+ $this->assertEquals(null, 'foo');
+ }
+
+ catch (PHPUnit2_Framework_AssertionFailedError $e) {
+ return;
+ }
+
+ $this->fail();
}
- /**
- * @todo Implement testAssertStringNotEqualsNull().
- */
public function testAssertStringNotEqualsNull() {
+ try {
+ $this->assertEquals('', null);
+ }
+
+ catch (PHPUnit2_Framework_AssertionFailedError $e) {
+ return;
+ }
+
+ $this->fail();
}
- /**
- * @todo Implement testAssertNullNotEqualsNull().
- */
public function testAssertNullNotEqualsNull() {
+ try {
+ $this->assertEquals(null, new PHPUnit2_Tests_Framework_Object);
+ }
+
+ catch (PHPUnit2_Framework_AssertionFailedError $e) {
+ return;
+ }
+
+ $this->fail();
}
public function testAssertNull() {