diff --git a/lam/tests/lib/LAMConfigTest.php b/lam/tests/lib/LAMConfigTest.php index 2d887992..972c5403 100644 --- a/lam/tests/lib/LAMConfigTest.php +++ b/lam/tests/lib/LAMConfigTest.php @@ -57,7 +57,7 @@ class LAMConfigTest extends TestCase { /** * Cleans up the environment after running a test. */ - protected function tearDown() { + protected function tearDown(): void { $this->lAMConfig = null; deleteConfigProfile(LAMConfigTest::FILE_NAME); $profiles = getConfigProfiles(); diff --git a/lam/tests/lib/baseModuleTest.php b/lam/tests/lib/baseModuleTest.php index d07390ea..9874b1fe 100644 --- a/lam/tests/lib/baseModuleTest.php +++ b/lam/tests/lib/baseModuleTest.php @@ -29,7 +29,7 @@ include_once __DIR__ . '/../../lib/baseModule.inc'; */ class BaseModuleTest extends TestCase { - function setup() { + protected function setup(): void { $_SESSION['language'] = 'en_GB.utf8:UTF-8:English (Great Britain)'; } diff --git a/lam/tests/lib/modules/ppolicyUserTest.php b/lam/tests/lib/modules/ppolicyUserTest.php index 52b92865..f5610e24 100644 --- a/lam/tests/lib/modules/ppolicyUserTest.php +++ b/lam/tests/lib/modules/ppolicyUserTest.php @@ -47,7 +47,7 @@ if (is_readable('lam/lib/modules/ppolicyUser.inc')) { private $options = array(); private $resultLog = null; - public function setUp() { + protected function setUp(): void { $this->job = $this->getMockBuilder('PPolicyPasswordNotifyJob') ->setMethods(array('getDBLastPwdChangeTime', 'setDBLastPwdChangeTime', 'sendMail', 'findUsers', 'getConfigPrefix', 'getPolicyOptions')) diff --git a/lam/tests/lib/modules/shadowAccountTest.php b/lam/tests/lib/modules/shadowAccountTest.php index 2fb8b13c..b576f6bb 100644 --- a/lam/tests/lib/modules/shadowAccountTest.php +++ b/lam/tests/lib/modules/shadowAccountTest.php @@ -133,7 +133,7 @@ if (is_readable('lam/lib/passwordExpirationJob.inc')) { private $options = array(); private $resultLog = null; - public function setUp() { + public function setUp(): void { $this->job = $this->getMockBuilder('ShadowAccountPasswordNotifyJob') ->setMethods(array('getDBLastPwdChangeTime', 'setDBLastPwdChangeTime', 'sendMail', 'findUsers', 'getConfigPrefix')) ->getMock(); diff --git a/lam/tests/lib/securityTest.php b/lam/tests/lib/securityTest.php index 2a5cf4a1..8dfbaa57 100644 --- a/lam/tests/lib/securityTest.php +++ b/lam/tests/lib/securityTest.php @@ -36,7 +36,7 @@ class SecurityTest extends TestCase { private $cfg = null; - protected function setUp() { + protected function setUp(): void { testCreateDefaultConfig (); $this->cfg = &$_SESSION ['cfgMain']; $this->resetPasswordRules(); @@ -45,7 +45,7 @@ class SecurityTest extends TestCase { /** * Cleans up the environment after running a test. */ - protected function tearDown() { + protected function tearDown(): void { testDeleteDefaultConfig(); parent::tearDown(); } diff --git a/lam/tests/lib/typesTest.php b/lam/tests/lib/typesTest.php index b23f9103..6291008f 100644 --- a/lam/tests/lib/typesTest.php +++ b/lam/tests/lib/typesTest.php @@ -33,7 +33,7 @@ class ListAttributeTest extends TestCase { private $type; - public function setUp() { + protected function setUp(): void { $this->type = $this->getMockBuilder('ConfiguredType')->setMethods(array('getBaseType'))->getMock(); $scope = new user($this->type); $this->type->method('getBaseType')->willReturn($scope);