-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from symcon/Fixes/start-end-time-typos
Fix für Typos und hinzufügen von Tests
- Loading branch information
Showing
10 changed files
with
526 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
{ | ||
"translations": { | ||
"de": { | ||
"Start time": "Startzeit", | ||
"End time": "Endzeit", | ||
"Start Time": "Startzeit", | ||
"End Time": "Endzeit", | ||
"Enable cyclic calculation": "Zyklische Berechnung aktivieren", | ||
"Source": "Quelle", | ||
"Source variables": "Quellevariablen", | ||
"Source variable": "Quellvariable", | ||
"Category": "Kategorie", | ||
"A Category is missing": "Eine Kategorie fehlt", | ||
"A category is missing": "Eine Kategorie fehlt", | ||
"A variable is invalid": "Eine Variable ist nicht valide", | ||
"Minutes": "Minuten" | ||
"Minutes": "Minuten", | ||
"The start time ist greater then the end time": "Die Startzeit ist größer als die Endzeit", | ||
"Recalculate": "Neu berechnen" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
if (defined('PHPUNIT_TESTSUITE')) { | ||
trait TestTime | ||
{ | ||
private $currentTime = 989884800; //May 15 2001 | ||
|
||
public function setTime(int $Time) | ||
{ | ||
$this->currentTime = $Time; | ||
} | ||
|
||
protected function getTime() | ||
{ | ||
return $this->currentTime; | ||
} | ||
} | ||
} else { | ||
trait TestTime | ||
{ | ||
protected function getTime() | ||
{ | ||
return time(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
define('VAR_BOOL', 0); | ||
define('VAR_INT', 1); | ||
define('VAR_FLOAT', 2); | ||
define('VAR_STRING', 3); | ||
|
||
include_once __DIR__ . '/stubs/GlobalStubs.php'; | ||
include_once __DIR__ . '/stubs/KernelStubs.php'; | ||
include_once __DIR__ . '/stubs/ModuleStubs.php'; | ||
include_once __DIR__ . '/stubs/MessageStubs.php'; | ||
include_once __DIR__ . '/stubs/ConstantStubs.php'; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
|
||
class TestBase extends TestCase | ||
{ | ||
protected $archiveControlID; | ||
protected $categoryInstanceID; | ||
|
||
protected function setUp(): void | ||
{ | ||
//Reset | ||
IPS\Kernel::reset(); | ||
|
||
//Register our core stubs for testing | ||
IPS\ModuleLoader::loadLibrary(__DIR__ . '/stubs/CoreStubs/library.json'); | ||
|
||
//Register our library we need for testing | ||
IPS\ModuleLoader::loadLibrary(__DIR__ . '/../library.json'); | ||
|
||
//Register required profiles | ||
if (!IPS_VariableProfileExists('~UnixTimestampDate')) { | ||
IPS_CreateVariableProfile('~UnixTimestampDate', VARIABLETYPE_INTEGER); | ||
} | ||
$this->archiveControlID = IPS_CreateInstance('{43192F0B-135B-4CE7-A0A7-1475603F3060}'); | ||
$this->categoryInstanceID = IPS_CreateInstance('{51CA1560-4725-A7F2-A449-94B7812E1986}'); | ||
|
||
parent::setUp(); | ||
} | ||
} |
Oops, something went wrong.