Issue #30 - Fixed stage values and broken tests.

This commit is contained in:
Daniel Thee Roperto
2016-09-19 13:13:03 +10:00
parent 2cfda63922
commit f0ae7b8410
4 changed files with 41 additions and 10 deletions

View File

@@ -161,7 +161,7 @@ class outage_test extends basic_testcase {
$outage = new outage([
'warntime' => $now - 50,
'starttime' => $now - 40,
'finishtime' => $now - 30,
'finished' => $now - 30,
'stoptime' => $now - 20,
'title' => 'Outage Finished before Stop',
]);
@@ -173,7 +173,7 @@ class outage_test extends basic_testcase {
'warntime' => $now - 50,
'starttime' => $now - 40,
'stoptime' => $now - 30,
'finishtime' => $now - 20,
'finished' => $now - 20,
'title' => 'Outage Finished after Stop',
]);
self::assertSame(outage::STAGE_FINISHED, $outage->get_stage($now));

31
tests/phpunit.xml Normal file
View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../lib/phpunit/phpunit.xsd"
bootstrap="../../../lib/phpunit/bootstrap.php"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
backupGlobals="false"
backupStaticAttributes="false"
stopOnError="false"
stopOnFailure="false"
stopOnIncomplete="false"
stopOnSkipped="false"
printerClass="Hint_ResultPrinter"
testSuiteLoaderClass="phpunit_autoloader"
>
<testsuites>
<testsuite name="auth_outage_testsuite">
<directory suffix="_test.php">./</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="false">
<directory suffix=".php">../classes</directory>
</whitelist>
</filter>
</phpunit>