...
  View open merge request
Commits (2)
  • Luke081515's avatar
    Colors! · 00a2ee8a
    Luke081515 authored
    Use Colors for unittests
    00a2ee8a
  • Luke081515's avatar
    Allow to use params at phpunit · ce7fafe4
    Luke081515 authored
    * 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
    ce7fafe4
......@@ -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();
}
......
cp Password.example.php Password.php
phpunit ./tests/BotCoreBasicTest.php $readSite $readUser $readPwd
\ No newline at end of file
phpunit --colors=always ./tests/BotCoreBasicTest.php $readSite $readUser $readPwd
\ No newline at end of file
cp Password.example.php Password.php
phpunit ./tests/BotCorePagePropertyTest.php $readSite $readUser $readPwd
\ No newline at end of file
phpunit --colors=always ./tests/BotCorePagePropertyTest.php $readSite $readUser $readPwd
\ No newline at end of file
cp Password.example.php Password.php
phpunit ./tests/BotCoreReadTest.php $readSite $readUser $readPwd
\ No newline at end of file
phpunit --colors=always ./tests/BotCoreReadTest.php $readSite $readUser $readPwd
\ No newline at end of file
cp Password.example.php Password.php
phpunit ./tests/BotCoreReadAssertFailTest.php $AssertWrongSite $AssertWrongUser $AssertWrongPwd
phpunit --colors=always ./tests/BotCoreReadAssertFailTest.php $AssertWrongSite $AssertWrongUser $AssertWrongPwd
cp Password.example.php Password.php
phpunit ./tests/BotCoreUserPropertyTest.php $readSite $readUser $readPwd
\ No newline at end of file
phpunit --colors=always ./tests/BotCoreUserPropertyTest.php $readSite $readUser $readPwd
\ No newline at end of file