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.
*/
protected function tearDown() {
protected function tearDown(): void {
$this->lAMConfig = null;
deleteConfigProfile(LAMConfigTest::FILE_NAME);
$profiles = getConfigProfiles();

View File

@ -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)';
}

View File

@ -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'))

View File

@ -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();

View File

@ -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();
}

View File

@ -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);