cvs: pear /PHPUnit/Framework Assert.php

From: Date: Sun, 04 Jan 2004 10:43:25 +0000
Subject: cvs: pear /PHPUnit/Framework Assert.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-15333@lists.php.net to get a copy of this message
sebastian Sun Jan 4 05:43:25 2004 EDT Modified files: /pear/PHPUnit/Framework Assert.php Log: Throw ComparisonFailure exception in case two strings were compared. Index: pear/PHPUnit/Framework/Assert.php diff -u pear/PHPUnit/Framework/Assert.php:1.10 pear/PHPUnit/Framework/Assert.php:1.11 --- pear/PHPUnit/Framework/Assert.php:1.10 Thu Jan 1 05:31:42 2004 +++ pear/PHPUnit/Framework/Assert.php Sun Jan 4 05:43:25 2004 @@ -12,7 +12,7 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: Assert.php,v 1.10 2004/01/01 10:31:42 sebastian Exp $ +// $Id: Assert.php,v 1.11 2004/01/04 10:43:25 sebastian Exp $ // require_once 'PHPUnit/Framework/AssertionFailedError.php'; @@ -359,6 +359,10 @@ * @static */ private static function failNotSame($expected, $actual, $message) { + if (is_string($expected) && is_string($actual)) { + throw new PHPUnit_Framework_ComparisonFailure($expected, $actual, $message); + } + self::fail( sprintf( '%s%sexpected same: <%s> was not: <%s>',

« previous php.pear.cvs (#15333) next »