Commit ce7fafe4 authored by Luke081515's avatar Luke081515

Allow to use params at phpunit

* Usually the script gets the site as first arg. If you are using params, it's not, so the script tries now to use the first arg as site, which has a .de, .org or .tk
parent 00a2ee8a
Pipeline #1303 passed with stages
in 1 minute and 50 seconds
......@@ -16,9 +16,13 @@ class TestCore extends Core {
** args[0] is the program name, so useless here
*/
public function __construct($loginData) {
$this->setSite($loginData[1]);
$this->setUsername($loginData[2]);
$this->setPassword($loginData[3]);
$i = 1;
while (!strpos($loginData[$i], ".de") && !strpos($loginData[$i], ".tk") && !strpos($loginData[$i], ".org")) {
$i++;
}
$this->setSite($loginData[$i]);
$this->setUsername($loginData[$i + 1]);
$this->setPassword($loginData[$i + 2]);
$this->initcurlArgs('TestCore', true, "bot", true);
$this->login();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment