cvs: pear /MDB_QueryTool/tests UnitTest.php

From: Date: Fri, 19 Mar 2004 01:11:49 +0000
Subject: cvs: pear /MDB_QueryTool/tests UnitTest.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-17532@lists.php.net to get a copy of this message
quipo Thu Mar 18 20:11:49 2004 EDT Modified files: /pear/MDB_QueryTool/tests UnitTest.php Log: add assertStringEquals() http://cvs.php.net/diff.php/pear/MDB_QueryTool/tests/UnitTest.php?r1=1.1&r2=1.2&ty=u Index: pear/MDB_QueryTool/tests/UnitTest.php diff -u pear/MDB_QueryTool/tests/UnitTest.php:1.1 pear/MDB_QueryTool/tests/UnitTest.php:1.2 --- pear/MDB_QueryTool/tests/UnitTest.php:1.1 Mon Jun 9 15:48:19 2003 +++ pear/MDB_QueryTool/tests/UnitTest.php Thu Mar 18 20:11:49 2004 @@ -1,6 +1,6 @@ <?php // -// $Id: UnitTest.php,v 1.1 2003/06/09 19:48:19 quipo Exp $ +// $Id: UnitTest.php,v 1.2 2004/03/19 01:11:49 quipo Exp $ // class tests_UnitTest extends PhpUnit_TestCase @@ -28,6 +28,12 @@ } */ } -} -?> + function assertStringEquals($expected,$actual,$msg='') + { + $expected = '~^\s*'.preg_replace('~\s+~','\s*',trim(preg_quote($expected))).'\s*$~i'; + $this->assertRegExp($expected,$actual,$msg); + } + +} +?> \ No newline at end of file

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