user = new common_test_TestUser([ GenerisRdf::PROPERTY_USER_DEFLG => [DEFAULT_LANG], GenerisRdf::PROPERTY_USER_UILG => [DEFAULT_LANG] ]); } public function getUser() { return $this->user; } /** * {@inheritDoc} * @see common_session_Session::getUserUri() */ public function getUserUri() { return $this->getUser()->getIdentifier(); } /** * {@inheritDoc} * @see common_session_Session::getUserLabel() */ public function getUserLabel() { return 'Virtual Test User'; } /** * {@inheritDoc} * @see common_session_Session::getUserRoles() */ public function getUserRoles() { return []; } /** * (non-PHPdoc) * @see common_session_Session::getUserPropertyValues() */ public function getUserPropertyValues($property) { return []; } /** * changes the current data language * * @param string $languageCode */ public function setDataLanguage($languageCode) { $this->getUser()->setPropertyValues(GenerisRdf::PROPERTY_USER_DEFLG, [$languageCode]); } /** * (non-PHPdoc) * @see common_session_Session::getDataLanguage() */ public function getDataLanguage() { $values = $this->getUser()->getPropertyValues(GenerisRdf::PROPERTY_USER_DEFLG); return $values[0]; } /** * Changes the current interface language * * @param string $languageCode */ public function setInterfaceLanguage($languageCode) { return $this->getUser()->setPropertyValues(GenerisRdf::PROPERTY_USER_UILG, [$languageCode]); } /** * (non-PHPdoc) * @see common_session_Session::getInterfaceLanguage() */ public function getInterfaceLanguage() { $values = $this->getUser()->getPropertyValues(GenerisRdf::PROPERTY_USER_UILG); return $values[0]; } /** * Changes the timezone of the test session * * @param string $timezone */ public function setTimeZone($timezone) { $this->timezone = $timezone; } /** * (non-PHPdoc) * @see common_session_Session::getTimeZone() */ public function getTimeZone() { return $this->timezone; } /** * (non-PHPdoc) * @see common_session_Session::refresh() */ public function refresh() { // nothign to do } /** * (non-PHPdoc) * @see common_session_Session::getContexts() */ public function getContexts(string $class = null): array { // nothign to do } }