From d20aa0f4a2c0501c4f7705f4d07ff0bbbecec3df Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 Jun 2012 00:15:59 +0200 Subject: [PATCH] Qual: More phpunit tests --- test/phpunit/FunctionsTest.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/test/phpunit/FunctionsTest.php b/test/phpunit/FunctionsTest.php index 6948292c9d9..9abce5d2589 100755 --- a/test/phpunit/FunctionsTest.php +++ b/test/phpunit/FunctionsTest.php @@ -243,11 +243,18 @@ class FunctionsTest extends PHPUnit_Framework_TestCase */ public function testDolNbOfLinesBis() { - $input="A string\nwith a é, &, < and >.\nThird line"; + // This is not a html string so nb of lines depends on \n + $input="A string\nwith a é, &, < and > and bold tag.\nThird line"; $after=dol_nboflines_bis($input,0); $this->assertEquals($after,3); - $input="A string
with a é, &, < and >.
Third line"; + // This is a html string so nb of lines depends on
+ $input="A string\nwith a é, &, < and > and bold tag.\nThird line"; + $after=dol_nboflines_bis($input,0); + $this->assertEquals($after,1); + + // This is a html string so nb of lines depends on
+ $input="A string
with a é, &, < and > and bold tag.
Third line"; $after=dol_nboflines_bis($input,0); $this->assertEquals($after,3);