unitTestsAreRunning = true; $this->resetGetAndPost(); parent::setUp(); // Create new class $this->partners = $this->initBaseClassObjectBySiteMapId(SiteMap::PUB_SEL_COMPANY); $this->users = new pubUsers(getFirstMatchByMapId(SiteMap::PUB_LOGIN)); } protected function tearDown(): void { $this->reloadDbTables(['mod_users']); $this->logOutUnitTestUser(); parent::tearDown(); } public function testChkLogoutStatus(): void { $this->setGet(['logout' => 1]); try { $this->users->controller->chkLogOut(); $this->fail('Exception Expected!'); } catch (Exception $error) { $this->assertExpected( ['Redirected to Location:'], $error->getMessage() ); } } public function testChkLogOut(): void { $this->setGet(['logout' => 1]); try { $this->users->controller->chkLogOut(); $this->fail('Exception Expected!'); } catch (Exception $error) { $this->assertExpected( ['Redirected to Location:'], $error->getMessage() ); } } public function testSaveProfileCfgProp(): void { $this->assertTrue( $this->users->controller->saveProfileCfgProp('bUseDarkMode', 1) ); } }