mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 12:39:25 +01:00
Move sanity check to a pre-condition check
This commit is contained in:
parent
63f458c196
commit
865fd6405d
@ -17,7 +17,6 @@ namespace EGroupware\Api;
|
|||||||
require_once realpath(__DIR__.'/../loader/common.php'); // autoloader & check_load_extension
|
require_once realpath(__DIR__.'/../loader/common.php'); // autoloader & check_load_extension
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase as TestCase;
|
use PHPUnit\Framework\TestCase as TestCase;
|
||||||
use PHPUnit\Framework\ExpectationFailedException as PHPUnitException;
|
|
||||||
use EGroupware\Api;
|
use EGroupware\Api;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -63,16 +62,16 @@ abstract class LoggedInTest extends TestCase
|
|||||||
static::markTestSkipped('Unable to connect to Egroupware - ' . $e->getMessage());
|
static::markTestSkipped('Unable to connect to Egroupware - ' . $e->getMessage());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do some checks to make sure things we expect are there
|
|
||||||
if(!static::sanity_check())
|
|
||||||
{
|
|
||||||
throw new PHPUnitException('Unable to connect to Egroupware - failed sanity check');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function assertPreConditions()
|
||||||
|
{
|
||||||
|
// Do some checks to make sure things we expect are there
|
||||||
|
$this->assertTrue(static::sanity_check(), 'Unable to connect to Egroupware - failed sanity check');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* End session when done - every test case gets its own session
|
* End session when done - every test class gets its own session
|
||||||
*/
|
*/
|
||||||
public static function tearDownAfterClass()
|
public static function tearDownAfterClass()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user