Explain why process isolation is a must

This commit is contained in:
Romain Quetiez
2023-10-25 22:18:05 +02:00
parent 722a58491c
commit cf774cdb90
3 changed files with 4 additions and 13 deletions

View File

@@ -6,7 +6,7 @@ use Combodo\iTop\Application\Helper\Session;
use Combodo\iTop\Test\UnitTest\ItopTestCase;
/**
* @runTestsInSeparateProcesses
* @runClassInSeparateProcess Required because PHPUnit outputs something earlier, thus causing the headers to be sent
*/
class SessionTest extends ItopTestCase
{
@@ -24,18 +24,9 @@ class SessionTest extends ItopTestCase
/**
* @covers \Combodo\iTop\Application\Helper\Session::Start
*/
public function testStart()
{
$this->assertNull(Session::$iSessionId);
Session::Start();
$this->assertNotNull(Session::$iSessionId);
}
/**
* @covers \Combodo\iTop\Application\Helper\Session::WriteClose
*/
public function testWriteClose()
public function testStartWriteClose()
{
$this->assertNull(Session::$iSessionId);
Session::Start();

View File

@@ -32,7 +32,7 @@ define('UNIT_MAX_CACHE_FILES', 10);
/**
* @runTestsInSeparateProcesses
* @runTestsInSeparateProcesses Required (at least) to mock the MetaModel and utils class
*/
class apcEmulationTest extends ItopTestCase
{

View File

@@ -66,7 +66,7 @@ class StatusIncTest extends ItopTestCase {
}
/**
* @runInSeparateProcess
* @runInSeparateProcess Required because Status constructor invokes MetaModel::Startup... which does nothing when already loaded
*/
public function testStatusStartupWrongDbPwd()
{