Improve #0002196: Comptes Alphanumériques calculés trop longs
This commit is contained in:
parent
50180e68ad
commit
f1d3862e17
8 changed files with 95 additions and 19 deletions
|
|
@ -851,7 +851,7 @@ class Acc_LedgerTest extends TestCase
|
|||
\Noalyss\Facility::save_file(__DIR__."/file", "acc_ledger-input_new.html", $result);
|
||||
$size=filesize(__DIR__."/file/acc_ledger-input_new.html");
|
||||
|
||||
$this->assertEquals(16325,$size," output input_new is not what it is expected");
|
||||
$this->assertEquals(15649,$size," output input_new is not what it is expected");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ class ContactTest extends TestCase
|
|||
$filename="contact-summary-1.html";
|
||||
\Noalyss\Facility::save_file($path,$filename,$r);
|
||||
print "File saved into $path/$filename";
|
||||
$this->assertEquals(4983, filesize ($path."/".$filename)," File not valide (1)");
|
||||
$this->assertEquals(4988, filesize ($path."/".$filename)," File not valide (1)");
|
||||
$this->assertEquals(5 , preg_match_all('/<tr class="/',$r)," 1. Missing card");
|
||||
$contact->filter_company(' fourni ');
|
||||
ob_start();
|
||||
|
|
@ -191,7 +191,7 @@ class ContactTest extends TestCase
|
|||
\Noalyss\Facility::save_file($path,$filename,$r);
|
||||
|
||||
print "File saved into $path/$filename";
|
||||
$this->assertEquals(3457,filesize ($path."/".$filename)," File not valide (2)");
|
||||
$this->assertEquals(3460,filesize ($path."/".$filename)," File not valide (2)");
|
||||
$this->assertEquals(3 , preg_match_all('/<tr class="/',$r), 'not found all the contacts from FOURNI');
|
||||
|
||||
|
||||
|
|
@ -202,7 +202,7 @@ class ContactTest extends TestCase
|
|||
$filename="contact-summary-3.html";
|
||||
\Noalyss\Facility::save_file($path,$filename,$r);
|
||||
print "File saved into $path/$filename";
|
||||
$this->assertEquals(2018,filesize ($path."/".$filename)," File not valide (3)");
|
||||
$this->assertEquals(2019,filesize ($path."/".$filename)," File not valide (3)");
|
||||
$this->assertEquals(1, preg_match_all('/<tr class="/',$r), 'Search does not filter');
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -629,14 +629,16 @@ where
|
|||
$fiche->setAttribut(ATTR_DEF_ACCOUNT, "");
|
||||
Card_Property::update($fiche);
|
||||
$fiche->load();
|
||||
$this->assertEquals('600CARDFORPHPUNIT',$fiche->strAttribut(ATTR_DEF_ACCOUNT),'Account not properly created');
|
||||
$this->assertEquals('600CARDF1',$fiche->strAttribut(ATTR_DEF_ACCOUNT),'Account not properly created');
|
||||
|
||||
for ( $i=600002; $i < 600999;$i++) {
|
||||
for ( $i=600002; $i < 600099;$i++) {
|
||||
$fiche->setAttribut(ATTR_DEF_NAME,'Card for testing '.$i);
|
||||
$fiche->setAttribut(ATTR_DEF_ACCOUNT, "");
|
||||
Card_Property::update($fiche);
|
||||
$fiche->load();
|
||||
$this->assertEquals("600CARDFORTESTING".$i,$fiche->strAttribut(ATTR_DEF_ACCOUNT),'Account not properly created');
|
||||
|
||||
$idx=$i-600000;
|
||||
$this->assertEquals("600CARDF".$idx,$fiche->strAttribut(ATTR_DEF_ACCOUNT),'Account not properly created');
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -655,15 +657,13 @@ where
|
|||
$fiche_def->save_class_base('600');
|
||||
$first=true;
|
||||
|
||||
for ( $i=1; $i < 1000;$i++) {
|
||||
for ( $i=1; $i < 100;$i++) {
|
||||
$fiche=new Fiche($this->g_connection);
|
||||
$fiche->insert(2,['av_text1'=>substr($i.' PHPUNIT '.__FUNCTION__,0,35)],);
|
||||
if ( $first ) {
|
||||
$first=false;
|
||||
$start=$fiche->id;
|
||||
}
|
||||
|
||||
$fiche->load();
|
||||
$this->assertEquals(substr("600".$i."PHPUNITTESTAUTOMATICACCOUNTINGIN",0,36),$fiche->strAttribut(ATTR_DEF_ACCOUNT),'Account not properly created');
|
||||
$expected="600".substr($i."PHPU",0,5);
|
||||
$this->assertEquals($expected,$fiche->strAttribut(ATTR_DEF_ACCOUNT),'Account not properly created');
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ class Follow_Up_DetailTest extends TestCase
|
|||
*/
|
||||
public static function setUpBeforeClass():void
|
||||
{
|
||||
|
||||
require DIRTEST.'/global.php';
|
||||
global $g_connection;
|
||||
$g_connection->exec_sql('delete from action_detail');
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ fi
|
|||
|
||||
if [ ! -z "$FOLDERTEST" -a -d "$FOLDERTEST" ] ; then
|
||||
|
||||
$PHPINI $PHPUNIT --globals-backup --bootstrap bootstrap.php $COVERAGE --testdox --color $FOLDERTEST
|
||||
$PHPINI $PHPUNIT --bootstrap bootstrap.php $COVERAGE --testdox --color $FOLDERTEST
|
||||
exit $?
|
||||
fi
|
||||
|
||||
|
|
@ -65,12 +65,12 @@ fi
|
|||
|
||||
if [ ! -z "$FUNCTION" ] ; then
|
||||
echo "testing $FILETOTEST $FUNCTION"
|
||||
$PHPINI $PHPUNIT --bootstrap $CUR_DIR/bootstrap.php --globals-backup --verbose --color --filter $FUNCTION $FILETOTEST
|
||||
$PHPINI $PHPUNIT --bootstrap $CUR_DIR/bootstrap.php --verbose --color --filter $FUNCTION $FILETOTEST
|
||||
else
|
||||
|
||||
# $PHPUNIT --bootstrap bootstrap.php --whitelist $FILETOTEST --coverage-text=${FILETOTEST%.php}.txt --color $FILETOTEST
|
||||
# $PHPUNIT --bootstrap $CUR_DIR/bootstrap.php --whitelist=$CUR_DIR/../include/class --coverage-html=coverage --color $FILETOTEST
|
||||
$PHPINI $PHPUNIT --bootstrap bootstrap.php $COVERAGE $FILETOTEST --testdox --color $FILETOTEST
|
||||
#$PHPUNIT --bootstrap bootstrap.php --whitelist=../include --globals-backup --coverage-html=coverage $FILETOTEST --testdox-html ${FILETOTEST%.php}-testdox.html --color $FILETOTEST
|
||||
#$PHPUNIT --bootstrap bootstrap.php --whitelist=../include --coverage-html=coverage $FILETOTEST --testdox-html ${FILETOTEST%.php}-testdox.html --color $FILETOTEST
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue