unitTestsAreRunning = true; parent::setUp(); $this->resetGetAndPost(); $this->clearDbState(); // Create new class $this->pubSysDashboard = $this->initBaseClassObjectBySiteMapId(SiteMap::SYSTEM_DASHBOARD); } protected function tearDown(): void { $this->clearDbState(); parent::tearDown(); } protected function clearDbState(): void { $this->reloadDbTables(['mod_users', 'mod_account_manager']); } public function testGetCompanySettings(): void { $data = $this->pubSysDashboard->controller->oUser->getCpCFG(); $this->assertEquals( [ 'nr' => 1, 'title' => 1, 'unit' => 1, 'count' => 1, 'sum' => 1, 'price' => 1, 'vat' => 1, ], $data['outgoingDocTableSettings'] ); } public function testSaveCompanySettings(): void { $saveData = [ 'nr' => 1, 'title' => 2 ]; $this->pubSysDashboard->controller->oUser->saveCpCFG( ['outgoingDocTableSettings' => $saveData] ); $this->assertEquals( $this->pubSysDashboard->controller->oUser->getCpCFG('outgoingDocTableSettings'), $saveData ); $this->pubSysDashboard->controller->oUser->saveCpCFG( ['outgoingDocLayout' => 0] ); $this->assertEquals( $this->pubSysDashboard->controller->oUser->getCpCFG('outgoingDocLayout'), 0 ); } }