Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Giehl <stefan@matomo.org>2020-11-24 23:10:17 +0300
committerGitHub <noreply@github.com>2020-11-24 23:10:17 +0300
commit62a107d295021a21db1a8a6e48c743a49ca55312 (patch)
treeac2579c859d76e5f53d004c8fa411563fa3b9a94 /tests/resources/install-matomo.php
parentfb7c6531c7e95dccea62388abfb275243b894366 (diff)
Fix Installer UI tests (#16781)
* Fix Installer UI tests * login after update no longer required * updates expected screenshots
Diffstat (limited to 'tests/resources/install-matomo.php')
-rw-r--r--tests/resources/install-matomo.php19
1 files changed, 3 insertions, 16 deletions
diff --git a/tests/resources/install-matomo.php b/tests/resources/install-matomo.php
index 7fa2587a52..7a4daa759c 100644
--- a/tests/resources/install-matomo.php
+++ b/tests/resources/install-matomo.php
@@ -13,6 +13,7 @@ use Piwik\Auth\Password;
use Piwik\Common;
use Piwik\Container\StaticContainer;
use Piwik\Date;
+use Piwik\Piwik;
use Piwik\Plugins\UsersManager\UsersManager;
use Piwik\Plugins\UsersManager\API as UsersManagerAPI;
use Piwik\Plugins\SitesManager\API as SitesManagerAPI;
@@ -91,12 +92,7 @@ function createSuperUser() {
$user = $model->getUser($login);
if (empty($user)) {
- // @todo remove once there is a first stable 4.0 release
- if (version_compare(\Piwik\Version::VERSION, '4.0.0-b1', '<')) {
- $model->addUser($login, $password, 'hello@example.org', $login, '01234567890123456789012345678912', Date::now()->getDatetime());
- } else {
- $model->addUser($login, $password, 'hello@example.org', Date::now()->getDatetime());
- }
+ $model->addUser($login, $password, 'hello@example.org', Date::now()->getDatetime());
} else {
$model->updateUser($login, $password, 'hello@example.org');
}
@@ -141,14 +137,6 @@ function createWebsite($dateTime)
return $idSite;
}
-function getTokenAuth()
-{
- $model = new \Piwik\Plugins\UsersManager\Model();
- $user = $model->getUser('superUserLogin');
-
- return $user['token_auth'];
-}
-
$_SERVER['HTTP_HOST'] = $host;
$_SERVER['SERVER_NAME'] = $host;
$dbConfig['dbname'] = 'latest_stable';
@@ -229,5 +217,4 @@ $settings->releaseChannel->save();
print "set release channel\n";
// print token auth (on last line so it can be easily parsed)
-$tokenAuth = getTokenAuth();
-print "$tokenAuth"; \ No newline at end of file
+print Piwik::requestTemporarySystemAuthToken('InstallerUITests', 24); \ No newline at end of file