Skip to content

Commit

Permalink
Try phpunit fix
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Oct 11, 2019
1 parent 1fadb2d commit 5446a7b
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions test/phpunit/BOMTest.php
Expand Up @@ -39,8 +39,11 @@


/**
* Class BillOfMaterialsTest
* @package Testbillofmaterials
* Class for PHPUnit tests
*
* @backupGlobals disabled
* @backupStaticAttributes enabled
* @remarks backupGlobals must be disabled to have db,conf,user and lang not erased.
*/
class BOMTest extends PHPUnit\Framework\TestCase
{
Expand Down Expand Up @@ -77,13 +80,6 @@ public static function setUpBeforeClass()
global $conf,$user,$langs,$db;
$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.

if (! empty($conf->global->MAIN_FIRSTNAME_NAME_POSITION)) {
print "\n".__METHOD__." Company must be setup to have name-firstname in order 'Firstname Lastname'\n";
die();
}
if (! empty($conf->global->MAIN_MODULE_LDAP)) { print "\n".__METHOD__." module LDAP must be disabled.\n"; die(); }
if (! empty($conf->global->MAIN_MODULE_MAILMANSPIP)) { print "\n".__METHOD__." module MailmanSpip must be disabled.\n"; die(); }

print __METHOD__."\n";
}

Expand Down Expand Up @@ -142,6 +138,6 @@ public function testBOMCreate()
print __METHOD__." result=".$result."\n";
$this->assertLessThan($result, 0);

return $localobject;
return $result;
}
}

0 comments on commit 5446a7b

Please sign in to comment.