This commit is contained in:
Roland Gruber 2019-11-30 11:16:25 +01:00
parent c71b01a73e
commit 84d20e204a
6 changed files with 7 additions and 7 deletions

View File

@ -57,7 +57,7 @@ class LAMConfigTest extends TestCase {
/** /**
* Cleans up the environment after running a test. * Cleans up the environment after running a test.
*/ */
protected function tearDown() { protected function tearDown(): void {
$this->lAMConfig = null; $this->lAMConfig = null;
deleteConfigProfile(LAMConfigTest::FILE_NAME); deleteConfigProfile(LAMConfigTest::FILE_NAME);
$profiles = getConfigProfiles(); $profiles = getConfigProfiles();

View File

@ -29,7 +29,7 @@ include_once __DIR__ . '/../../lib/baseModule.inc';
*/ */
class BaseModuleTest extends TestCase { class BaseModuleTest extends TestCase {
function setup() { protected function setup(): void {
$_SESSION['language'] = 'en_GB.utf8:UTF-8:English (Great Britain)'; $_SESSION['language'] = 'en_GB.utf8:UTF-8:English (Great Britain)';
} }

View File

@ -47,7 +47,7 @@ if (is_readable('lam/lib/modules/ppolicyUser.inc')) {
private $options = array(); private $options = array();
private $resultLog = null; private $resultLog = null;
public function setUp() { protected function setUp(): void {
$this->job = $this->getMockBuilder('PPolicyPasswordNotifyJob') $this->job = $this->getMockBuilder('PPolicyPasswordNotifyJob')
->setMethods(array('getDBLastPwdChangeTime', 'setDBLastPwdChangeTime', 'sendMail', ->setMethods(array('getDBLastPwdChangeTime', 'setDBLastPwdChangeTime', 'sendMail',
'findUsers', 'getConfigPrefix', 'getPolicyOptions')) 'findUsers', 'getConfigPrefix', 'getPolicyOptions'))

View File

@ -133,7 +133,7 @@ if (is_readable('lam/lib/passwordExpirationJob.inc')) {
private $options = array(); private $options = array();
private $resultLog = null; private $resultLog = null;
public function setUp() { public function setUp(): void {
$this->job = $this->getMockBuilder('ShadowAccountPasswordNotifyJob') $this->job = $this->getMockBuilder('ShadowAccountPasswordNotifyJob')
->setMethods(array('getDBLastPwdChangeTime', 'setDBLastPwdChangeTime', 'sendMail', 'findUsers', 'getConfigPrefix')) ->setMethods(array('getDBLastPwdChangeTime', 'setDBLastPwdChangeTime', 'sendMail', 'findUsers', 'getConfigPrefix'))
->getMock(); ->getMock();

View File

@ -36,7 +36,7 @@ class SecurityTest extends TestCase {
private $cfg = null; private $cfg = null;
protected function setUp() { protected function setUp(): void {
testCreateDefaultConfig (); testCreateDefaultConfig ();
$this->cfg = &$_SESSION ['cfgMain']; $this->cfg = &$_SESSION ['cfgMain'];
$this->resetPasswordRules(); $this->resetPasswordRules();
@ -45,7 +45,7 @@ class SecurityTest extends TestCase {
/** /**
* Cleans up the environment after running a test. * Cleans up the environment after running a test.
*/ */
protected function tearDown() { protected function tearDown(): void {
testDeleteDefaultConfig(); testDeleteDefaultConfig();
parent::tearDown(); parent::tearDown();
} }

View File

@ -33,7 +33,7 @@ class ListAttributeTest extends TestCase {
private $type; private $type;
public function setUp() { protected function setUp(): void {
$this->type = $this->getMockBuilder('ConfiguredType')->setMethods(array('getBaseType'))->getMock(); $this->type = $this->getMockBuilder('ConfiguredType')->setMethods(array('getBaseType'))->getMock();
$scope = new user($this->type); $scope = new user($this->type);
$this->type->method('getBaseType')->willReturn($scope); $this->type->method('getBaseType')->willReturn($scope);