diff --git a/.gitignore b/.gitignore
index 462770aad..e0f65ee58 100644
--- a/.gitignore
+++ b/.gitignore
@@ -45,6 +45,9 @@ test/vendor/*
!/log/index.php
!/log/web.config
+# PHPUnit cache file
+/test/.phpunit.result.cache
+
# Jetbrains
/.idea/**
diff --git a/application/applicationextension.inc.php b/application/applicationextension.inc.php
index 94254dc95..5b658d3ee 100644
--- a/application/applicationextension.inc.php
+++ b/application/applicationextension.inc.php
@@ -1402,11 +1402,11 @@ interface iBackofficeDictEntriesPrefixesExtension
/**
* Implement this interface to add content to any enhanced portal page
*
- * IMPORTANT! Experimental API, may be removed at anytime, we don't recommend to use it just now!
- *
* @api
* @package Extensibility
- * @since 2.4.0
+ *
+ * @since 2.4.0 interface creation
+ * @since 2.7.0 change method signatures due to Silex to Symfony migration
*/
interface iPortalUIExtension
{
@@ -1479,7 +1479,11 @@ interface iPortalUIExtension
}
/**
- * IMPORTANT! Experimental API, may be removed at anytime, we don't recommend to use it just now!
+ * Extend this class instead of iPortalUIExtension if you don't need to overload all methods
+ *
+ * @api
+ * @package Extensibility
+ * @since 2.4.0
*/
abstract class AbstractPortalUIExtension implements iPortalUIExtension
{
diff --git a/application/forms.class.inc.php b/application/forms.class.inc.php
index d9280a03b..d0665625b 100644
--- a/application/forms.class.inc.php
+++ b/application/forms.class.inc.php
@@ -1272,7 +1272,7 @@ class DesignerComboField extends DesignerFormField
$sChecked = $this->defaultValue ? 'checked' : '';
$sMandatory = $this->bMandatory ? 'true' : 'false';
$sReadOnly = $this->IsReadOnly() ? 'disabled="disabled"' : '';
- if ($this->IsSorted())
+ if ($this->IsSorted() && isset($this->aAllowedValues) )
{
asort($this->aAllowedValues);
}
@@ -1320,19 +1320,17 @@ class DesignerComboField extends DesignerFormField
$sHtml .= "";
}
}
- foreach($this->aAllowedValues as $sKey => $sDisplayValue)
- {
- if ($this->bMultipleSelection)
- {
- $sSelected = in_array($sKey, $this->defaultValue) ? 'selected' : '';
+ if ( isset($this->aAllowedValues) ) {
+ foreach ($this->aAllowedValues as $sKey => $sDisplayValue) {
+ if ($this->bMultipleSelection) {
+ $sSelected = in_array($sKey, $this->defaultValue) ? 'selected' : '';
+ } else {
+ $sSelected = ($sKey == $this->defaultValue) ? 'selected' : '';
+ }
+ // Quick and dirty: display the menu parents as a tree
+ $sHtmlValue = str_replace(' ', ' ', $sDisplayValue);
+ $sHtml .= "";
}
- else
- {
- $sSelected = ($sKey == $this->defaultValue) ? 'selected' : '';
- }
- // Quick and dirty: display the menu parents as a tree
- $sHtmlValue = str_replace(' ', ' ', htmlentities($sDisplayValue, ENT_QUOTES, 'UTF-8'));
- $sHtml .= "";
}
$sHtml .= "";
if ($this->bOtherChoices)
diff --git a/core/cmdbchangeop.class.inc.php b/core/cmdbchangeop.class.inc.php
index 85dbb9283..d4d90e308 100644
--- a/core/cmdbchangeop.class.inc.php
+++ b/core/cmdbchangeop.class.inc.php
@@ -78,23 +78,31 @@ class CMDBChangeOp extends DBObject implements iCMDBChangeOp
}
/**
- * @inheritDoc
- */
+ * Describe (as a text string) the modifications corresponding to this change
+ */
public function GetDescription()
{
return '';
}
/**
- * Safety net: in case the change is not given, let's guarantee that it will
- * be set to the current ongoing change (or create a new one)
- */
+ * Safety net:
+ * * if change isn't persisted yet, use the current change and persist it if needed
+ * * in case the change is not given, let's guarantee that it will be set to the current ongoing change (or create a new one)
+ *
+ * @since 2.7.7 3.0.2 3.1.0 N°3717 do persist the current change if needed
+ */
protected function OnInsert()
{
- if ($this->Get('change') <= 0)
- {
- $this->Set('change', CMDBObject::GetCurrentChange());
+ $iChange = $this->Get('change');
+ if (($iChange <= 0) || (is_null($iChange))) {
+ $oChange = CMDBObject::GetCurrentChange();
+ if ($oChange->IsNew()) {
+ $oChange->DBWrite();
+ }
+ $this->Set('change', $oChange);
}
+
parent::OnInsert();
}
}
diff --git a/core/cmdbobject.class.inc.php b/core/cmdbobject.class.inc.php
index 4a070d239..ed687e9ca 100644
--- a/core/cmdbobject.class.inc.php
+++ b/core/cmdbobject.class.inc.php
@@ -113,6 +113,26 @@ abstract class CMDBObject extends DBObject
self::$m_oCurrChange = $oChange;
}
+ /**
+ * @param string $sUserInfo
+ * @param string $sOrigin
+ * @param \DateTime $oDate
+ *
+ * @throws \CoreException
+ *
+ * @since 2.7.7 3.0.2 3.1.0 N°3717 new method to reset current change
+ */
+ public static function SetCurrentChangeFromParams($sUserInfo, $sOrigin = null, $oDate = null)
+ {
+ static::SetTrackInfo($sUserInfo);
+ static::SetTrackOrigin($sOrigin);
+ static::CreateChange();
+
+ if (!is_null($oDate)) {
+ static::$m_oCurrChange->Set("date", $oDate);
+ }
+ }
+
//
// Todo: simplify the APIs and do not pass the current change as an argument anymore
// SetTrackInfo to be invoked in very few cases (UI.php, CSV import, Data synchro)
@@ -144,6 +164,8 @@ abstract class CMDBObject extends DBObject
* $oMyChange->Set("userinfo", 'this is done by ... for ...');
* $iChangeId = $oMyChange->DBInsert();
*
+ * **warning** : this will do nothing if current change already exists !
+ *
* @see SetCurrentChange to specify a CMDBObject instance instead
*
* @param string $sInfo
@@ -171,6 +193,8 @@ abstract class CMDBObject extends DBObject
/**
* Provides information about the origin of the change
*
+ * **warning** : this will do nothing if current change already exists !
+ *
* @see SetTrackInfo
* @see SetCurrentChange to specify a CMDBObject instance instead
*
@@ -181,18 +205,15 @@ abstract class CMDBObject extends DBObject
{
self::$m_sOrigin = $sOrigin;
}
-
+
/**
* Get the additional information (defaulting to user name)
- */
- protected static function GetTrackInfo()
+ */
+ public static function GetTrackInfo()
{
- if (is_null(self::$m_sInfo))
- {
+ if (is_null(self::$m_sInfo)) {
return CMDBChange::GetCurrentUserName();
- }
- else
- {
+ } else {
return self::$m_sInfo;
}
}
@@ -243,6 +264,9 @@ abstract class CMDBObject extends DBObject
* @throws \CoreWarning
* @throws \MySQLException
* @throws \OQLException
+ *
+ * @since 2.7.7 3.0.2 3.1.0 N°3717 {@see CMDBChange} **will be persisted later** in {@see \CMDBChangeOp::OnInsert} (was done previously directly here)
+ * This will avoid creating in DB CMDBChange lines without any corresponding CMDBChangeOp
*/
protected static function CreateChange()
{
@@ -251,7 +275,6 @@ abstract class CMDBObject extends DBObject
self::$m_oCurrChange->Set("userinfo", self::GetTrackInfo());
self::$m_oCurrChange->Set("user_id", self::GetTrackUserId());
self::$m_oCurrChange->Set("origin", self::GetTrackOrigin());
- self::$m_oCurrChange->DBInsert();
}
/**
diff --git a/css/light-grey.scss b/css/light-grey.scss
index 85d4bc350..c3d0522ed 100644
--- a/css/light-grey.scss
+++ b/css/light-grey.scss
@@ -2582,6 +2582,12 @@
}
}
}
+
+ &[data-attribute-type="AttributeDuration"] {
+ .field_value_container {
+ white-space: nowrap;
+ }
+ }
}
.one-col-details .details .field_container.field_small {
diff --git a/datamodels/2.x/combodo-db-tools/dbtools.php b/datamodels/2.x/combodo-db-tools/dbtools.php
index bfdd797b4..e48b9dbf0 100644
--- a/datamodels/2.x/combodo-db-tools/dbtools.php
+++ b/datamodels/2.x/combodo-db-tools/dbtools.php
@@ -359,9 +359,7 @@ function DisplayLostAttachments(iTopWebPage &$oP, ApplicationContext &$oAppConte
$sHistoryEntry = Dict::Format('DBTools:LostAttachments:History', $oOrmDocument->GetFileName());
CMDBObject::SetTrackInfo(UserRights::GetUserFriendlyName());
$oChangeOp = MetaModel::NewObject('CMDBChangeOpPlugin');
- /** @var \Change $oChange */
- $oChange = CMDBObject::GetCurrentChange();
- $oChangeOp->Set('change', $oChange->GetKey());
+ // CMDBChangeOp.change will be automatically filled
$oChangeOp->Set('objclass', $sTargetClass);
$oChangeOp->Set('objkey', $sTargetId);
$oChangeOp->Set('description', $sHistoryEntry);
diff --git a/js/forms-json-utils.js b/js/forms-json-utils.js
index daaf94d0c..8ff1956b2 100644
--- a/js/forms-json-utils.js
+++ b/js/forms-json-utils.js
@@ -304,75 +304,61 @@ function ValidateField(sFieldId, sPattern, bMandatory, sFormId, nullValue, origi
function ValidateCKEditField(sFieldId, sPattern, bMandatory, sFormId, nullValue, originalValue)
{
- var bValid;
- var sExplain = '';
- var sTextContent;
+ if ($('#'+sFieldId).size() > 0) {
+ var bValid;
+ var sExplain = '';
+ var sTextContent;
- if ($('#'+sFieldId).prop('disabled'))
- {
- bValid = true; // disabled fields are not checked
- }
- else
- {
- // Get the contents without the tags
- var oFormattedContents = $("#cke_"+sFieldId+" iframe");
- if (oFormattedContents.length == 0)
- {
- var oSourceContents = $("#cke_"+sFieldId+" textarea.cke_source");
- sTextContent = oSourceContents.val();
- }
- else
- {
- sTextContent = oFormattedContents.contents().find("body").text();
-
- if (sTextContent == '')
- {
- // No plain text, maybe there is just an image...
- var oImg = oFormattedContents.contents().find("body img");
- if (oImg.length != 0)
- {
- sTextContent = 'image';
+ if ($('#'+sFieldId).prop('disabled')) {
+ bValid = true; // disabled fields are not checked
+ } else {
+ // Get the contents without the tags
+ var oFormattedContents = $("#cke_"+sFieldId+" iframe");
+ if (oFormattedContents.length == 0) {
+ var oSourceContents = $("#cke_"+sFieldId+" textarea.cke_source");
+ sTextContent = oSourceContents.val();
+ } else {
+ sTextContent = oFormattedContents.contents().find("body").text();
+
+ if (sTextContent == '') {
+ // No plain text, maybe there is just an image...
+ var oImg = oFormattedContents.contents().find("body img");
+ if (oImg.length != 0) {
+ sTextContent = 'image';
+ }
}
}
- }
- // Get the original value without the tags
- var oFormattedOriginalContents = (originalValue !== undefined) ? $('
').html(originalValue) : undefined;
- var sTextOriginalContents = (oFormattedOriginalContents !== undefined) ? oFormattedOriginalContents.text() : undefined;
-
- if (bMandatory && (sTextContent == nullValue))
- {
- bValid = false;
- sExplain = Dict.S('UI:ValueMustBeSet');
- }
- else if ((sTextOriginalContents != undefined) && (sTextContent == sTextOriginalContents))
- {
- bValid = false;
- if (sTextOriginalContents == nullValue)
- {
+ // Get the original value without the tags
+ var oFormattedOriginalContents = (originalValue !== undefined) ? $('').html(originalValue) : undefined;
+ var sTextOriginalContents = (oFormattedOriginalContents !== undefined) ? oFormattedOriginalContents.text() : undefined;
+
+ if (bMandatory && (sTextContent == nullValue)) {
+ bValid = false;
sExplain = Dict.S('UI:ValueMustBeSet');
- }
- else
- {
- // Note: value change check is not working well yet as the HTML to Text conversion is not exactly the same when done from the PHP value or the CKEditor value.
- sExplain = Dict.S('UI:ValueMustBeChanged');
+ } else if ((sTextOriginalContents != undefined) && (sTextContent == sTextOriginalContents)) {
+ bValid = false;
+ if (sTextOriginalContents == nullValue) {
+ sExplain = Dict.S('UI:ValueMustBeSet');
+ } else {
+ // Note: value change check is not working well yet as the HTML to Text conversion is not exactly the same when done from the PHP value or the CKEditor value.
+ sExplain = Dict.S('UI:ValueMustBeChanged');
+ }
+ } else {
+ bValid = true;
}
}
- else
- {
- bValid = true;
+
+ ReportFieldValidationStatus(sFieldId, sFormId, bValid, sExplain);
+
+ if ($('#'+sFieldId).data('timeout_validate') == undefined) {
+ // We need to check periodically as CKEditor doesn't trigger our events. More details in UIHTMLEditorWidget::Display() @ line 92
+ var iTimeoutValidate = setInterval(function () {
+ ValidateCKEditField(sFieldId, sPattern, bMandatory, sFormId, nullValue, originalValue);
+ }, 500);
+ $('#'+sFieldId).data('timeout_validate', iTimeoutValidate);
}
}
-
- ReportFieldValidationStatus(sFieldId, sFormId, bValid, sExplain);
-
- if ($('#'+sFieldId).data('timeout_validate') == undefined) {
- // We need to check periodically as CKEditor doesn't trigger our events. More details in UIHTMLEditorWidget::Display() @ line 92
- var iTimeoutValidate = setInterval(function () {
- ValidateCKEditField(sFieldId, sPattern, bMandatory, sFormId, nullValue, originalValue);
- }, 500);
- $('#'+sFieldId).data('timeout_validate', iTimeoutValidate);
- }
}
function ResetPwd(id)
diff --git a/pages/ajax.render.php b/pages/ajax.render.php
index 81a5a50ff..cc043316c 100644
--- a/pages/ajax.render.php
+++ b/pages/ajax.render.php
@@ -1118,7 +1118,16 @@ EOF
$aUpdatedDecoded = array();
foreach ($aUpdatedProperties as $sProp) {
$sDecodedProp = str_replace('attr_', '', $sProp); // Remove the attr_ prefix
- $aCurrentValues[$sDecodedProp] = (isset($aPreviousValues[$sProp]) ? $aPreviousValues[$sProp] : ''); // Set the previous value
+ // Set the previous value
+ if ( isset($aPreviousValues[$sProp]) && $aPreviousValues[$sProp] != '' ){
+ $aCurrentValues[$sDecodedProp] = $aPreviousValues[$sProp];
+ } else {
+ if(gettype($aCurrentValues[$sDecodedProp]) == "array") {
+ $aCurrentValues[$sDecodedProp] = [];
+ } else {
+ $aCurrentValues[$sDecodedProp] = '';
+ }
+ }
$aUpdatedDecoded[] = $sDecodedProp;
}
diff --git a/setup/modulediscovery.class.inc.php b/setup/modulediscovery.class.inc.php
index 1330f4a2c..cfbfb3653 100644
--- a/setup/modulediscovery.class.inc.php
+++ b/setup/modulediscovery.class.inc.php
@@ -19,9 +19,47 @@
*
*/
-class MissingDependencyException extends Exception
+class MissingDependencyException extends CoreException
{
+ /**
+ * @see \ModuleDiscovery::OrderModulesByDependencies property init
+ * @var array>
+ * module id as key
+ * another array as value, containing : 'module' with module info, 'dependencies' with missing dependencies
+ */
public $aModulesInfo;
+
+ /**
+ * @return string HTML to print to the user the modules impacted
+ * @since 2.7.7 3.0.2 3.1.0 PR #280
+ */
+ public function getHtmlDesc($sHighlightHtmlBegin = null, $sHighlightHtmlEnd = null)
+ {
+ $sErrorMessage = <<The following modules have unmet dependencies:
+
+HTML;
+ foreach ($this->aModulesInfo as $sModuleId => $aModuleErrors) {
+ $sModuleLabel = $aModuleErrors['module']['label'];
+ $aModuleMissingDependencies = $aModuleErrors['dependencies'];
+ $sErrorMessage .= <<{$sModuleLabel} ({$sModuleId}):
+
+HTML;
+
+ foreach ($aModuleMissingDependencies as $sMissingModule) {
+ $sErrorMessage .= "- {$sMissingModule}
";
+ }
+ $sErrorMessage .= <<
+
+HTML;
+
+ }
+ $sErrorMessage .= '
';
+
+ return $sErrorMessage;
+ }
}
class ModuleDiscovery
diff --git a/setup/wizardsteps.class.inc.php b/setup/wizardsteps.class.inc.php
index c5696326e..44579ffb9 100644
--- a/setup/wizardsteps.class.inc.php
+++ b/setup/wizardsteps.class.inc.php
@@ -1394,7 +1394,7 @@ class WizStepModulesChoice extends WizardStep
}
catch(MissingDependencyException $e)
{
- $oPage->warning($e->getMessage());
+ $oPage->warning($e->getHtmlDesc());
}
$this->bUpgrade = ($this->oWizard->GetParameter('install_mode') != 'install');
@@ -2138,7 +2138,7 @@ class WizStepSummary extends WizardStep
catch(MissingDependencyException $e)
{
$this->bDependencyCheck = false;
- $this->sDependencyIssue = $e->getMessage();
+ $this->sDependencyIssue = $e->getHtmlDesc();
}
}
return $this->bDependencyCheck;
diff --git a/test/ItopDataTestCase.php b/test/ItopDataTestCase.php
index 460c27139..e6f5d01db 100644
--- a/test/ItopDataTestCase.php
+++ b/test/ItopDataTestCase.php
@@ -79,7 +79,7 @@ class ItopDataTestCase extends ItopTestCase
/**
* @throws Exception
*/
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
require_once(APPROOT.'application/utils.inc.php');
@@ -101,15 +101,12 @@ class ItopDataTestCase extends ItopTestCase
/**
* @throws Exception
*/
- protected function tearDown()
+ protected function tearDown(): void
{
- if (static::USE_TRANSACTION)
- {
+ if (static::USE_TRANSACTION) {
$this->debug("ROLLBACK !!!");
CMDBSource::Query('ROLLBACK');
- }
- else
- {
+ } else {
$this->debug("");
$this->aCreatedObjects = array_reverse($this->aCreatedObjects);
foreach ($this->aCreatedObjects as $oObject)
diff --git a/test/ItopTestCase.php b/test/ItopTestCase.php
index d527471d3..84d980d8a 100644
--- a/test/ItopTestCase.php
+++ b/test/ItopTestCase.php
@@ -34,7 +34,8 @@ class ItopTestCase extends TestCase
{
const TEST_LOG_DIR = 'test';
- protected function setUp()
+ /** @noinspection UsingInclusionOnceReturnValueInspection avoid errors for approot includes */
+ protected function setUp(): void
{
@include_once '../approot.inc.php';
@include_once '../../approot.inc.php';
@@ -57,9 +58,9 @@ class ItopTestCase extends TestCase
{
echo "$sMsg\n";
}
- else
- {
- print_r($sMsg);
+ else {
+ /** @noinspection ForgottenDebugOutputInspection */
+ print_r($sMsg);
}
}
}
diff --git a/test/OQL/DataLocalizerTest.php b/test/OQL/DataLocalizerTest.php
index 7ef28dd74..651faeb91 100644
--- a/test/OQL/DataLocalizerTest.php
+++ b/test/OQL/DataLocalizerTest.php
@@ -21,10 +21,10 @@ class DataLocalizerTest extends ItopDataTestCase
const USE_TRANSACTION = false;
const TEST_CSV_RESULT = 'DataLocalizerTest.csv';
- public function setUp()
+ protected function setUp(): void
{
parent::setUp();
- require_once(APPROOT.'application/startup.inc.php');
+
ApplicationContext::SetPluginProperty('QueryLocalizerPlugin', 'language_code', 'FR FR');
SetupUtils::builddir(APPROOT.'log/test/OQLToSQL');
diff --git a/test/OQL/OQLToSQLAllClassesTest.php b/test/OQL/OQLToSQLAllClassesTest.php
index bc24bd5b2..ace2b85a7 100644
--- a/test/OQL/OQLToSQLAllClassesTest.php
+++ b/test/OQL/OQLToSQLAllClassesTest.php
@@ -22,10 +22,9 @@ class OQLToSQLAllCLassesTest extends ItopDataTestCase
{
const USE_TRANSACTION = false;
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
- require_once(APPROOT.'application/startup.inc.php');
SetupUtils::builddir(APPROOT.'log/test/OQLToSQL');
}
diff --git a/test/OQL/OQLToSQLGroupByTest.php b/test/OQL/OQLToSQLGroupByTest.php
index ff7a76e27..4f1cc0992 100644
--- a/test/OQL/OQLToSQLGroupByTest.php
+++ b/test/OQL/OQLToSQLGroupByTest.php
@@ -19,10 +19,9 @@ class OQLToSQLTest extends ItopDataTestCase
const USE_TRANSACTION = false;
const TEST_CSV_RESULT = 'OQLToSQLTest.csv';
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
- require_once(APPROOT.'application/startup.inc.php');
SetupUtils::builddir(APPROOT.'log/test/OQLToSQL');
}
diff --git a/test/OQL/OQLToSQLNestedSelectTest.php b/test/OQL/OQLToSQLNestedSelectTest.php
index 9d6cbb619..3d81aeb90 100644
--- a/test/OQL/OQLToSQLNestedSelectTest.php
+++ b/test/OQL/OQLToSQLNestedSelectTest.php
@@ -24,10 +24,9 @@ class OQLToSQLNestedSelectTest extends ItopDataTestCase
const USE_TRANSACTION = false;
const TEST_CSV_RESULT = 'OQLToSQLTest.csv';
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
- require_once(APPROOT.'application/startup.inc.php');
SetupUtils::builddir(APPROOT.'log/test/OQLToSQL');
}
diff --git a/test/OQL/OQLToSQLTest.php b/test/OQL/OQLToSQLTest.php
index 11dff955a..07a0021f1 100644
--- a/test/OQL/OQLToSQLTest.php
+++ b/test/OQL/OQLToSQLTest.php
@@ -26,10 +26,9 @@ class OQLToSQLTest extends ItopDataTestCase
const USE_TRANSACTION = false;
const TEST_CSV_RESULT = 'OQLToSQLTest.csv';
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
- require_once(APPROOT.'application/startup.inc.php');
SetupUtils::builddir(APPROOT.'log/test/OQLToSQL');
}
diff --git a/test/application/DashboardLayoutTest.php b/test/application/DashboardLayoutTest.php
index 26104cfc9..93e992386 100644
--- a/test/application/DashboardLayoutTest.php
+++ b/test/application/DashboardLayoutTest.php
@@ -24,13 +24,6 @@ use Combodo\iTop\Test\UnitTest\ItopTestCase;
*/
class DashboardLayoutTest extends ItopTestCase
{
- public function setUp()
- {
- parent::setUp();
-
- require_once APPROOT.'application/dashboardlayout.class.inc.php';
- }
-
/**
* @return array
*/
diff --git a/test/application/UtilsTest.php b/test/application/UtilsTest.php
index 1b425ccda..462ad1eb7 100644
--- a/test/application/UtilsTest.php
+++ b/test/application/UtilsTest.php
@@ -24,12 +24,6 @@
*/
class UtilsTest extends \Combodo\iTop\Test\UnitTest\ItopTestCase
{
- public function setUp()
- {
- parent::setUp();
- require_once(APPROOT.'application/utils.inc.php');
- }
-
public function testEndsWith()
{
$this->assertFalse(utils::EndsWith('a', 'bbbb'));
diff --git a/test/application/composer/iTopComposerTest.php b/test/application/composer/iTopComposerTest.php
index f139944fa..d04db2827 100644
--- a/test/application/composer/iTopComposerTest.php
+++ b/test/application/composer/iTopComposerTest.php
@@ -27,7 +27,7 @@ use Combodo\iTop\Test\UnitTest\ItopTestCase;
class iTopComposerTest extends ItopTestCase
{
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
clearstatcache();
@@ -40,7 +40,7 @@ class iTopComposerTest extends ItopTestCase
public function testIsTestDir($sDirName, $bIsTest)
{
$isTestDir = iTopComposer::IsTestDir($sDirName);
- $this->assertInternalType('int', $isTestDir);
+ $this->assertIsInt($isTestDir);
if (true === $bIsTest) {
$this->assertTrue(($isTestDir > 0));
} else {
diff --git a/test/application/privUITransactionFileTest.php b/test/application/privUITransactionFileTest.php
index 7cc7ec8de..f7960cbe6 100644
--- a/test/application/privUITransactionFileTest.php
+++ b/test/application/privUITransactionFileTest.php
@@ -34,13 +34,6 @@ class privUITransactionFileTest extends ItopDataTestCase
const USER1_TEST_LOGIN = 'user1_support_test_privUITransaction';
const USER2_TEST_LOGIN = 'user2_support_test_privUITransaction';
- public function setUp()
- {
- parent::setUp();
- require_once(APPROOT.'/application/startup.inc.php');
-// require_once(APPROOT.'application/utils.inc.php');
- }
-
/**
* @dataProvider cleanupOldTransactionsProvider
*/
diff --git a/test/application/search/CriterionConversionTest.php b/test/application/search/CriterionConversionTest.php
index 78e9c7d34..3a5bacd63 100644
--- a/test/application/search/CriterionConversionTest.php
+++ b/test/application/search/CriterionConversionTest.php
@@ -53,16 +53,6 @@ class CriterionConversionTest extends ItopDataTestCase
{
const CREATE_TEST_ORG = true;
- /**
- * @throws \Exception
- */
- protected function setUp()
- {
- parent::setUp();
-
- require_once(APPROOT."sources/application/search/criterionconversionabstract.class.inc.php");
- }
-
/**
* @dataProvider ToOqlProvider
*
diff --git a/test/application/search/CriterionParserTest.php b/test/application/search/CriterionParserTest.php
index 9413ab9cb..b785af418 100644
--- a/test/application/search/CriterionParserTest.php
+++ b/test/application/search/CriterionParserTest.php
@@ -29,7 +29,7 @@
namespace Combodo\iTop\Test\UnitTest\Application\Search;
use Combodo\iTop\Application\Search\CriterionParser;
-use Combodo\iTop\Test\UnitTest\ItopTestCase;
+use Combodo\iTop\Test\UnitTest\ItopDataTestCase;
/**
* @group itopRequestMgmt
@@ -37,16 +37,8 @@ use Combodo\iTop\Test\UnitTest\ItopTestCase;
* @preserveGlobalState disabled
* @backupGlobals disabled
*/
-class CriterionParserTest extends ItopTestCase
+class CriterionParserTest extends ItopDataTestCase
{
- protected function setUp()
- {
- parent::setUp();
-
- require_once(APPROOT."application/startup.inc.php");
- require_once(APPROOT."sources/application/search/criterionparser.class.inc.php");
- }
-
public function testParse()
{
$sBaseOql = 'SELECT UserRequest';
diff --git a/test/application/search/SearchFormTest.php b/test/application/search/SearchFormTest.php
index 4e2d4ec4f..d71c0d4fa 100644
--- a/test/application/search/SearchFormTest.php
+++ b/test/application/search/SearchFormTest.php
@@ -38,16 +38,6 @@ class SearchFormTest extends ItopDataTestCase
{
const CREATE_TEST_ORG = true;
- /**
- * @throws Exception
- */
- protected function setUp()
- {
- parent::setUp();
-
- require_once(APPROOT."sources/application/search/searchform.class.inc.php");
- }
-
/**
* @dataProvider GetFieldsProvider
* @throws \OQLException
diff --git a/test/composer.json b/test/composer.json
index 511fa9083..5e570e48d 100644
--- a/test/composer.json
+++ b/test/composer.json
@@ -1,10 +1,10 @@
{
- "require": {
- "phpunit/phpunit": "^6"
- },
-
- "autoload": {
- "psr-4": { "": "src/" }
+ "require-dev": {
+ "phpunit/phpunit": "^8.5.23"
+ },
+ "autoload": {
+ "psr-4": {
+ "": "src/"
}
-
+ }
}
diff --git a/test/composer.lock b/test/composer.lock
index 094a73224..351e80239 100644
--- a/test/composer.lock
+++ b/test/composer.lock
@@ -1,41 +1,40 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
- "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
+ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "e45f846daa710cb799f80d91c1f35aef",
- "packages": [
+ "content-hash": "e564642f87b1049582c4001ac479b368",
+ "packages": [],
+ "packages-dev": [
{
"name": "doctrine/instantiator",
- "version": "1.1.0",
+ "version": "1.4.1",
"source": {
"type": "git",
"url": "https://github.com/doctrine/instantiator.git",
- "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda"
+ "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda",
- "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda",
+ "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc",
+ "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc",
"shasum": ""
},
"require": {
- "php": "^7.1"
+ "php": "^7.1 || ^8.0"
},
"require-dev": {
- "athletic/athletic": "~0.1.8",
+ "doctrine/coding-standard": "^9",
"ext-pdo": "*",
"ext-phar": "*",
- "phpunit/phpunit": "^6.2.3",
- "squizlabs/php_codesniffer": "^3.0.2"
+ "phpbench/phpbench": "^0.16 || ^1",
+ "phpstan/phpstan": "^1.4",
+ "phpstan/phpstan-phpunit": "^1",
+ "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
+ "vimeo/psalm": "^4.22"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.2.x-dev"
- }
- },
"autoload": {
"psr-4": {
"Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
@@ -49,47 +48,69 @@
{
"name": "Marco Pivetta",
"email": "ocramius@gmail.com",
- "homepage": "http://ocramius.github.com/"
+ "homepage": "https://ocramius.github.io/"
}
],
"description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
- "homepage": "https://github.com/doctrine/instantiator",
+ "homepage": "https://www.doctrine-project.org/projects/instantiator.html",
"keywords": [
"constructor",
"instantiate"
],
- "time": "2017-07-22T11:58:36+00:00"
+ "support": {
+ "issues": "https://github.com/doctrine/instantiator/issues",
+ "source": "https://github.com/doctrine/instantiator/tree/1.4.1"
+ },
+ "funding": [
+ {
+ "url": "https://www.doctrine-project.org/sponsorship.html",
+ "type": "custom"
+ },
+ {
+ "url": "https://www.patreon.com/phpdoctrine",
+ "type": "patreon"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2022-03-03T08:28:38+00:00"
},
{
"name": "myclabs/deep-copy",
- "version": "1.7.0",
+ "version": "1.11.0",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
- "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e"
+ "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e",
- "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e",
+ "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614",
+ "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614",
"shasum": ""
},
"require": {
- "php": "^5.6 || ^7.0"
+ "php": "^7.1 || ^8.0"
+ },
+ "conflict": {
+ "doctrine/collections": "<1.6.8",
+ "doctrine/common": "<2.13.3 || >=3,<3.2.2"
},
"require-dev": {
- "doctrine/collections": "^1.0",
- "doctrine/common": "^2.6",
- "phpunit/phpunit": "^4.1"
+ "doctrine/collections": "^1.6.8",
+ "doctrine/common": "^2.13.3 || ^3.2.2",
+ "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13"
},
"type": "library",
"autoload": {
- "psr-4": {
- "DeepCopy\\": "src/DeepCopy/"
- },
"files": [
"src/DeepCopy/deep_copy.php"
- ]
+ ],
+ "psr-4": {
+ "DeepCopy\\": "src/DeepCopy/"
+ }
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -103,32 +124,43 @@
"object",
"object graph"
],
- "time": "2017-10-19T19:58:43+00:00"
+ "support": {
+ "issues": "https://github.com/myclabs/DeepCopy/issues",
+ "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0"
+ },
+ "funding": [
+ {
+ "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2022-03-03T13:19:32+00:00"
},
{
"name": "phar-io/manifest",
- "version": "1.0.1",
+ "version": "2.0.3",
"source": {
"type": "git",
"url": "https://github.com/phar-io/manifest.git",
- "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0"
+ "reference": "97803eca37d319dfa7826cc2437fc020857acb53"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phar-io/manifest/zipball/2df402786ab5368a0169091f61a7c1e0eb6852d0",
- "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0",
+ "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53",
+ "reference": "97803eca37d319dfa7826cc2437fc020857acb53",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-phar": "*",
- "phar-io/version": "^1.0.1",
- "php": "^5.6 || ^7.0"
+ "ext-xmlwriter": "*",
+ "phar-io/version": "^3.0.1",
+ "php": "^7.2 || ^8.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0.x-dev"
+ "dev-master": "2.0.x-dev"
}
},
"autoload": {
@@ -158,24 +190,28 @@
}
],
"description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
- "time": "2017-03-05T18:14:27+00:00"
+ "support": {
+ "issues": "https://github.com/phar-io/manifest/issues",
+ "source": "https://github.com/phar-io/manifest/tree/2.0.3"
+ },
+ "time": "2021-07-20T11:28:43+00:00"
},
{
"name": "phar-io/version",
- "version": "1.0.1",
+ "version": "3.2.1",
"source": {
"type": "git",
"url": "https://github.com/phar-io/version.git",
- "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df"
+ "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phar-io/version/zipball/a70c0ced4be299a63d32fa96d9281d03e94041df",
- "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df",
+ "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74",
+ "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74",
"shasum": ""
},
"require": {
- "php": "^5.6 || ^7.0"
+ "php": "^7.2 || ^8.0"
},
"type": "library",
"autoload": {
@@ -205,39 +241,38 @@
}
],
"description": "Library for handling version information and constraints",
- "time": "2017-03-05T17:38:23+00:00"
+ "support": {
+ "issues": "https://github.com/phar-io/version/issues",
+ "source": "https://github.com/phar-io/version/tree/3.2.1"
+ },
+ "time": "2022-02-21T01:04:05+00:00"
},
{
"name": "phpdocumentor/reflection-common",
- "version": "1.0.1",
+ "version": "2.2.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionCommon.git",
- "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6"
+ "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6",
- "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6",
+ "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b",
+ "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b",
"shasum": ""
},
"require": {
- "php": ">=5.5"
- },
- "require-dev": {
- "phpunit/phpunit": "^4.6"
+ "php": "^7.2 || ^8.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0.x-dev"
+ "dev-2.x": "2.x-dev"
}
},
"autoload": {
"psr-4": {
- "phpDocumentor\\Reflection\\": [
- "src"
- ]
+ "phpDocumentor\\Reflection\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -259,44 +294,46 @@
"reflection",
"static analysis"
],
- "time": "2017-09-11T18:02:19+00:00"
+ "support": {
+ "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues",
+ "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x"
+ },
+ "time": "2020-06-27T09:03:43+00:00"
},
{
"name": "phpdocumentor/reflection-docblock",
- "version": "4.3.0",
+ "version": "5.3.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
- "reference": "94fd0001232e47129dd3504189fa1c7225010d08"
+ "reference": "622548b623e81ca6d78b721c5e029f4ce664f170"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08",
- "reference": "94fd0001232e47129dd3504189fa1c7225010d08",
+ "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170",
+ "reference": "622548b623e81ca6d78b721c5e029f4ce664f170",
"shasum": ""
},
"require": {
- "php": "^7.0",
- "phpdocumentor/reflection-common": "^1.0.0",
- "phpdocumentor/type-resolver": "^0.4.0",
- "webmozart/assert": "^1.0"
+ "ext-filter": "*",
+ "php": "^7.2 || ^8.0",
+ "phpdocumentor/reflection-common": "^2.2",
+ "phpdocumentor/type-resolver": "^1.3",
+ "webmozart/assert": "^1.9.1"
},
"require-dev": {
- "doctrine/instantiator": "~1.0.5",
- "mockery/mockery": "^1.0",
- "phpunit/phpunit": "^6.4"
+ "mockery/mockery": "~1.3.2",
+ "psalm/phar": "^4.8"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "4.x-dev"
+ "dev-master": "5.x-dev"
}
},
"autoload": {
"psr-4": {
- "phpDocumentor\\Reflection\\": [
- "src/"
- ]
+ "phpDocumentor\\Reflection\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -307,44 +344,50 @@
{
"name": "Mike van Riel",
"email": "me@mikevanriel.com"
+ },
+ {
+ "name": "Jaap van Otterdijk",
+ "email": "account@ijaap.nl"
}
],
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
- "time": "2017-11-30T07:14:17+00:00"
+ "support": {
+ "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues",
+ "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0"
+ },
+ "time": "2021-10-19T17:43:47+00:00"
},
{
"name": "phpdocumentor/type-resolver",
- "version": "0.4.0",
+ "version": "1.6.1",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
- "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7"
+ "reference": "77a32518733312af16a44300404e945338981de3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7",
- "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7",
+ "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3",
+ "reference": "77a32518733312af16a44300404e945338981de3",
"shasum": ""
},
"require": {
- "php": "^5.5 || ^7.0",
- "phpdocumentor/reflection-common": "^1.0"
+ "php": "^7.2 || ^8.0",
+ "phpdocumentor/reflection-common": "^2.0"
},
"require-dev": {
- "mockery/mockery": "^0.9.4",
- "phpunit/phpunit": "^5.2||^4.8.24"
+ "ext-tokenizer": "*",
+ "psalm/phar": "^4.8"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0.x-dev"
+ "dev-1.x": "1.x-dev"
}
},
"autoload": {
"psr-4": {
- "phpDocumentor\\Reflection\\": [
- "src/"
- ]
+ "phpDocumentor\\Reflection\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -357,42 +400,47 @@
"email": "me@mikevanriel.com"
}
],
- "time": "2017-07-14T14:27:02+00:00"
+ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
+ "support": {
+ "issues": "https://github.com/phpDocumentor/TypeResolver/issues",
+ "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1"
+ },
+ "time": "2022-03-15T21:29:03+00:00"
},
{
"name": "phpspec/prophecy",
- "version": "1.7.6",
+ "version": "v1.15.0",
"source": {
"type": "git",
"url": "https://github.com/phpspec/prophecy.git",
- "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712"
+ "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpspec/prophecy/zipball/33a7e3c4fda54e912ff6338c48823bd5c0f0b712",
- "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712",
+ "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13",
+ "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13",
"shasum": ""
},
"require": {
- "doctrine/instantiator": "^1.0.2",
- "php": "^5.3|^7.0",
- "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0",
- "sebastian/comparator": "^1.1|^2.0|^3.0",
- "sebastian/recursion-context": "^1.0|^2.0|^3.0"
+ "doctrine/instantiator": "^1.2",
+ "php": "^7.2 || ~8.0, <8.2",
+ "phpdocumentor/reflection-docblock": "^5.2",
+ "sebastian/comparator": "^3.0 || ^4.0",
+ "sebastian/recursion-context": "^3.0 || ^4.0"
},
"require-dev": {
- "phpspec/phpspec": "^2.5|^3.2",
- "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5"
+ "phpspec/phpspec": "^6.0 || ^7.0",
+ "phpunit/phpunit": "^8.0 || ^9.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.7.x-dev"
+ "dev-master": "1.x-dev"
}
},
"autoload": {
- "psr-0": {
- "Prophecy\\": "src/"
+ "psr-4": {
+ "Prophecy\\": "src/Prophecy"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -420,44 +468,48 @@
"spy",
"stub"
],
- "time": "2018-04-18T13:57:24+00:00"
+ "support": {
+ "issues": "https://github.com/phpspec/prophecy/issues",
+ "source": "https://github.com/phpspec/prophecy/tree/v1.15.0"
+ },
+ "time": "2021-12-08T12:19:24+00:00"
},
{
"name": "phpunit/php-code-coverage",
- "version": "5.3.2",
+ "version": "7.0.15",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "c89677919c5dd6d3b3852f230a663118762218ac"
+ "reference": "819f92bba8b001d4363065928088de22f25a3a48"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/c89677919c5dd6d3b3852f230a663118762218ac",
- "reference": "c89677919c5dd6d3b3852f230a663118762218ac",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/819f92bba8b001d4363065928088de22f25a3a48",
+ "reference": "819f92bba8b001d4363065928088de22f25a3a48",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-xmlwriter": "*",
- "php": "^7.0",
- "phpunit/php-file-iterator": "^1.4.2",
+ "php": ">=7.2",
+ "phpunit/php-file-iterator": "^2.0.2",
"phpunit/php-text-template": "^1.2.1",
- "phpunit/php-token-stream": "^2.0.1",
+ "phpunit/php-token-stream": "^3.1.3 || ^4.0",
"sebastian/code-unit-reverse-lookup": "^1.0.1",
- "sebastian/environment": "^3.0",
+ "sebastian/environment": "^4.2.2",
"sebastian/version": "^2.0.1",
- "theseer/tokenizer": "^1.1"
+ "theseer/tokenizer": "^1.1.3"
},
"require-dev": {
- "phpunit/phpunit": "^6.0"
+ "phpunit/phpunit": "^8.2.2"
},
"suggest": {
- "ext-xdebug": "^2.5.5"
+ "ext-xdebug": "^2.7.2"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "5.3.x-dev"
+ "dev-master": "7.0-dev"
}
},
"autoload": {
@@ -483,29 +535,42 @@
"testing",
"xunit"
],
- "time": "2018-04-06T15:36:58+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
+ "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/7.0.15"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2021-07-26T12:20:09+00:00"
},
{
"name": "phpunit/php-file-iterator",
- "version": "1.4.5",
+ "version": "2.0.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
- "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4"
+ "reference": "42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4",
- "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5",
+ "reference": "42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": ">=7.1"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^8.5"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.4.x-dev"
+ "dev-master": "2.0.x-dev"
}
},
"autoload": {
@@ -520,7 +585,7 @@
"authors": [
{
"name": "Sebastian Bergmann",
- "email": "sb@sebastian-bergmann.de",
+ "email": "sebastian@phpunit.de",
"role": "lead"
}
],
@@ -530,7 +595,17 @@
"filesystem",
"iterator"
],
- "time": "2017-11-27T13:52:08+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues",
+ "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.5"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2021-12-02T12:42:26+00:00"
},
{
"name": "phpunit/php-text-template",
@@ -571,32 +646,36 @@
"keywords": [
"template"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-text-template/issues",
+ "source": "https://github.com/sebastianbergmann/php-text-template/tree/1.2.1"
+ },
"time": "2015-06-21T13:50:34+00:00"
},
{
"name": "phpunit/php-timer",
- "version": "1.0.9",
+ "version": "2.1.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-timer.git",
- "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f"
+ "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f",
- "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/2454ae1765516d20c4ffe103d85a58a9a3bd5662",
+ "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662",
"shasum": ""
},
"require": {
- "php": "^5.3.3 || ^7.0"
+ "php": ">=7.1"
},
"require-dev": {
- "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
+ "phpunit/phpunit": "^8.5"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0-dev"
+ "dev-master": "2.1-dev"
}
},
"autoload": {
@@ -611,7 +690,7 @@
"authors": [
{
"name": "Sebastian Bergmann",
- "email": "sb@sebastian-bergmann.de",
+ "email": "sebastian@phpunit.de",
"role": "lead"
}
],
@@ -620,33 +699,43 @@
"keywords": [
"timer"
],
- "time": "2017-02-26T11:10:40+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-timer/issues",
+ "source": "https://github.com/sebastianbergmann/php-timer/tree/2.1.3"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-11-30T08:20:02+00:00"
},
{
"name": "phpunit/php-token-stream",
- "version": "2.0.2",
+ "version": "4.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-token-stream.git",
- "reference": "791198a2c6254db10131eecfe8c06670700904db"
+ "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/791198a2c6254db10131eecfe8c06670700904db",
- "reference": "791198a2c6254db10131eecfe8c06670700904db",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/a853a0e183b9db7eed023d7933a858fa1c8d25a3",
+ "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3",
"shasum": ""
},
"require": {
"ext-tokenizer": "*",
- "php": "^7.0"
+ "php": "^7.3 || ^8.0"
},
"require-dev": {
- "phpunit/phpunit": "^6.2.4"
+ "phpunit/phpunit": "^9.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0-dev"
+ "dev-master": "4.0-dev"
}
},
"autoload": {
@@ -669,57 +758,67 @@
"keywords": [
"tokenizer"
],
- "time": "2017-11-27T05:48:46+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-token-stream/issues",
+ "source": "https://github.com/sebastianbergmann/php-token-stream/tree/master"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "abandoned": true,
+ "time": "2020-08-04T08:28:15+00:00"
},
{
"name": "phpunit/phpunit",
- "version": "6.5.8",
+ "version": "8.5.26",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "4f21a3c6b97c42952fd5c2837bb354ec0199b97b"
+ "reference": "ef117c59fc4c54a979021b26d08a3373e386606d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/4f21a3c6b97c42952fd5c2837bb354ec0199b97b",
- "reference": "4f21a3c6b97c42952fd5c2837bb354ec0199b97b",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ef117c59fc4c54a979021b26d08a3373e386606d",
+ "reference": "ef117c59fc4c54a979021b26d08a3373e386606d",
"shasum": ""
},
"require": {
+ "doctrine/instantiator": "^1.3.1",
"ext-dom": "*",
"ext-json": "*",
"ext-libxml": "*",
"ext-mbstring": "*",
"ext-xml": "*",
- "myclabs/deep-copy": "^1.6.1",
- "phar-io/manifest": "^1.0.1",
- "phar-io/version": "^1.0",
- "php": "^7.0",
- "phpspec/prophecy": "^1.7",
- "phpunit/php-code-coverage": "^5.3",
- "phpunit/php-file-iterator": "^1.4.3",
+ "ext-xmlwriter": "*",
+ "myclabs/deep-copy": "^1.10.0",
+ "phar-io/manifest": "^2.0.3",
+ "phar-io/version": "^3.0.2",
+ "php": ">=7.2",
+ "phpspec/prophecy": "^1.10.3",
+ "phpunit/php-code-coverage": "^7.0.12",
+ "phpunit/php-file-iterator": "^2.0.4",
"phpunit/php-text-template": "^1.2.1",
- "phpunit/php-timer": "^1.0.9",
- "phpunit/phpunit-mock-objects": "^5.0.5",
- "sebastian/comparator": "^2.1",
- "sebastian/diff": "^2.0",
- "sebastian/environment": "^3.1",
- "sebastian/exporter": "^3.1",
- "sebastian/global-state": "^2.0",
+ "phpunit/php-timer": "^2.1.2",
+ "sebastian/comparator": "^3.0.2",
+ "sebastian/diff": "^3.0.2",
+ "sebastian/environment": "^4.2.3",
+ "sebastian/exporter": "^3.1.2",
+ "sebastian/global-state": "^3.0.0",
"sebastian/object-enumerator": "^3.0.3",
- "sebastian/resource-operations": "^1.0",
+ "sebastian/resource-operations": "^2.0.1",
+ "sebastian/type": "^1.1.3",
"sebastian/version": "^2.0.1"
},
- "conflict": {
- "phpdocumentor/reflection-docblock": "3.0.2",
- "phpunit/dbunit": "<3.0"
- },
"require-dev": {
"ext-pdo": "*"
},
"suggest": {
+ "ext-soap": "*",
"ext-xdebug": "*",
- "phpunit/php-invoker": "^1.1"
+ "phpunit/php-invoker": "^2.0.0"
},
"bin": [
"phpunit"
@@ -727,7 +826,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "6.5.x-dev"
+ "dev-master": "8.5-dev"
}
},
"autoload": {
@@ -753,86 +852,41 @@
"testing",
"xunit"
],
- "time": "2018-04-10T11:38:34+00:00"
- },
- {
- "name": "phpunit/phpunit-mock-objects",
- "version": "5.0.6",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
- "reference": "33fd41a76e746b8fa96d00b49a23dadfa8334cdf"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/phpunit/issues",
+ "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.26"
},
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/33fd41a76e746b8fa96d00b49a23dadfa8334cdf",
- "reference": "33fd41a76e746b8fa96d00b49a23dadfa8334cdf",
- "shasum": ""
- },
- "require": {
- "doctrine/instantiator": "^1.0.5",
- "php": "^7.0",
- "phpunit/php-text-template": "^1.2.1",
- "sebastian/exporter": "^3.1"
- },
- "conflict": {
- "phpunit/phpunit": "<6.0"
- },
- "require-dev": {
- "phpunit/phpunit": "^6.5"
- },
- "suggest": {
- "ext-soap": "*"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "5.0.x-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
+ "funding": [
{
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
+ "url": "https://phpunit.de/sponsors.html",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
}
],
- "description": "Mock Object library for PHPUnit",
- "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/",
- "keywords": [
- "mock",
- "xunit"
- ],
- "time": "2018-01-06T05:45:45+00:00"
+ "time": "2022-04-01T12:34:39+00:00"
},
{
"name": "sebastian/code-unit-reverse-lookup",
- "version": "1.0.1",
+ "version": "1.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
- "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18"
+ "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
- "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
+ "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/1de8cd5c010cb153fcd68b8d0f64606f523f7619",
+ "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619",
"shasum": ""
},
"require": {
- "php": "^5.6 || ^7.0"
+ "php": ">=5.6"
},
"require-dev": {
- "phpunit/phpunit": "^5.7 || ^6.0"
+ "phpunit/phpunit": "^8.5"
},
"type": "library",
"extra": {
@@ -857,34 +911,44 @@
],
"description": "Looks up which function or method a line of code belongs to",
"homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
- "time": "2017-03-04T06:30:41+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues",
+ "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/1.0.2"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-11-30T08:15:22+00:00"
},
{
"name": "sebastian/comparator",
- "version": "2.1.3",
+ "version": "3.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
- "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9"
+ "reference": "1071dfcef776a57013124ff35e1fc41ccd294758"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/34369daee48eafb2651bea869b4b15d75ccc35f9",
- "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9",
+ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1071dfcef776a57013124ff35e1fc41ccd294758",
+ "reference": "1071dfcef776a57013124ff35e1fc41ccd294758",
"shasum": ""
},
"require": {
- "php": "^7.0",
- "sebastian/diff": "^2.0 || ^3.0",
+ "php": ">=7.1",
+ "sebastian/diff": "^3.0",
"sebastian/exporter": "^3.1"
},
"require-dev": {
- "phpunit/phpunit": "^6.4"
+ "phpunit/phpunit": "^8.5"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.1.x-dev"
+ "dev-master": "3.0-dev"
}
},
"autoload": {
@@ -897,6 +961,10 @@
"BSD-3-Clause"
],
"authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ },
{
"name": "Jeff Welch",
"email": "whatthejeff@gmail.com"
@@ -908,10 +976,6 @@
{
"name": "Bernhard Schussek",
"email": "bschussek@2bepublished.at"
- },
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
}
],
"description": "Provides the functionality to compare PHP values for equality",
@@ -921,32 +985,43 @@
"compare",
"equality"
],
- "time": "2018-02-01T13:46:46+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/comparator/issues",
+ "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.3"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-11-30T08:04:30+00:00"
},
{
"name": "sebastian/diff",
- "version": "2.0.1",
+ "version": "3.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
- "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd"
+ "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/347c1d8b49c5c3ee30c7040ea6fc446790e6bddd",
- "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd",
+ "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/14f72dd46eaf2f2293cbe79c93cc0bc43161a211",
+ "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211",
"shasum": ""
},
"require": {
- "php": "^7.0"
+ "php": ">=7.1"
},
"require-dev": {
- "phpunit/phpunit": "^6.2"
+ "phpunit/phpunit": "^7.5 || ^8.0",
+ "symfony/process": "^2 || ^3.3 || ^4"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0-dev"
+ "dev-master": "3.0-dev"
}
},
"autoload": {
@@ -959,46 +1034,62 @@
"BSD-3-Clause"
],
"authors": [
- {
- "name": "Kore Nordmann",
- "email": "mail@kore-nordmann.de"
- },
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
+ },
+ {
+ "name": "Kore Nordmann",
+ "email": "mail@kore-nordmann.de"
}
],
"description": "Diff implementation",
"homepage": "https://github.com/sebastianbergmann/diff",
"keywords": [
- "diff"
+ "diff",
+ "udiff",
+ "unidiff",
+ "unified diff"
],
- "time": "2017-08-03T08:09:46+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/diff/issues",
+ "source": "https://github.com/sebastianbergmann/diff/tree/3.0.3"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-11-30T07:59:04+00:00"
},
{
"name": "sebastian/environment",
- "version": "3.1.0",
+ "version": "4.2.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
- "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5"
+ "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5",
- "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5",
+ "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/d47bbbad83711771f167c72d4e3f25f7fcc1f8b0",
+ "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0",
"shasum": ""
},
"require": {
- "php": "^7.0"
+ "php": ">=7.1"
},
"require-dev": {
- "phpunit/phpunit": "^6.1"
+ "phpunit/phpunit": "^7.5"
+ },
+ "suggest": {
+ "ext-posix": "*"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.1.x-dev"
+ "dev-master": "4.2-dev"
}
},
"autoload": {
@@ -1023,29 +1114,39 @@
"environment",
"hhvm"
],
- "time": "2017-07-01T08:51:00+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/environment/issues",
+ "source": "https://github.com/sebastianbergmann/environment/tree/4.2.4"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-11-30T07:53:42+00:00"
},
{
"name": "sebastian/exporter",
- "version": "3.1.0",
+ "version": "3.1.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
- "reference": "234199f4528de6d12aaa58b612e98f7d36adb937"
+ "reference": "0c32ea2e40dbf59de29f3b49bf375176ce7dd8db"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937",
- "reference": "234199f4528de6d12aaa58b612e98f7d36adb937",
+ "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/0c32ea2e40dbf59de29f3b49bf375176ce7dd8db",
+ "reference": "0c32ea2e40dbf59de29f3b49bf375176ce7dd8db",
"shasum": ""
},
"require": {
- "php": "^7.0",
+ "php": ">=7.0",
"sebastian/recursion-context": "^3.0"
},
"require-dev": {
"ext-mbstring": "*",
- "phpunit/phpunit": "^6.0"
+ "phpunit/phpunit": "^8.5"
},
"type": "library",
"extra": {
@@ -1063,6 +1164,10 @@
"BSD-3-Clause"
],
"authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ },
{
"name": "Jeff Welch",
"email": "whatthejeff@gmail.com"
@@ -1071,17 +1176,13 @@
"name": "Volker Dusch",
"email": "github@wallbash.com"
},
- {
- "name": "Bernhard Schussek",
- "email": "bschussek@2bepublished.at"
- },
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- },
{
"name": "Adam Harvey",
"email": "aharvey@php.net"
+ },
+ {
+ "name": "Bernhard Schussek",
+ "email": "bschussek@gmail.com"
}
],
"description": "Provides the functionality to export PHP variables for visualization",
@@ -1090,27 +1191,40 @@
"export",
"exporter"
],
- "time": "2017-04-03T13:19:02+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/exporter/issues",
+ "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.4"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2021-11-11T13:51:24+00:00"
},
{
"name": "sebastian/global-state",
- "version": "2.0.0",
+ "version": "3.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/global-state.git",
- "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4"
+ "reference": "de036ec91d55d2a9e0db2ba975b512cdb1c23921"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4",
- "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4",
+ "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/de036ec91d55d2a9e0db2ba975b512cdb1c23921",
+ "reference": "de036ec91d55d2a9e0db2ba975b512cdb1c23921",
"shasum": ""
},
"require": {
- "php": "^7.0"
+ "php": ">=7.2",
+ "sebastian/object-reflector": "^1.1.1",
+ "sebastian/recursion-context": "^3.0"
},
"require-dev": {
- "phpunit/phpunit": "^6.0"
+ "ext-dom": "*",
+ "phpunit/phpunit": "^8.0"
},
"suggest": {
"ext-uopz": "*"
@@ -1118,7 +1232,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0-dev"
+ "dev-master": "3.0-dev"
}
},
"autoload": {
@@ -1141,24 +1255,34 @@
"keywords": [
"global state"
],
- "time": "2017-04-27T15:39:26+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/global-state/issues",
+ "source": "https://github.com/sebastianbergmann/global-state/tree/3.0.2"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2022-02-10T06:55:38+00:00"
},
{
"name": "sebastian/object-enumerator",
- "version": "3.0.3",
+ "version": "3.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-enumerator.git",
- "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5"
+ "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5",
- "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5",
+ "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2",
+ "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2",
"shasum": ""
},
"require": {
- "php": "^7.0",
+ "php": ">=7.0",
"sebastian/object-reflector": "^1.1.1",
"sebastian/recursion-context": "^3.0"
},
@@ -1188,24 +1312,34 @@
],
"description": "Traverses array structures and object graphs to enumerate all referenced objects",
"homepage": "https://github.com/sebastianbergmann/object-enumerator/",
- "time": "2017-08-03T12:35:26+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/object-enumerator/issues",
+ "source": "https://github.com/sebastianbergmann/object-enumerator/tree/3.0.4"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-11-30T07:40:27+00:00"
},
{
"name": "sebastian/object-reflector",
- "version": "1.1.1",
+ "version": "1.1.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-reflector.git",
- "reference": "773f97c67f28de00d397be301821b06708fca0be"
+ "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be",
- "reference": "773f97c67f28de00d397be301821b06708fca0be",
+ "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/9b8772b9cbd456ab45d4a598d2dd1a1bced6363d",
+ "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d",
"shasum": ""
},
"require": {
- "php": "^7.0"
+ "php": ">=7.0"
},
"require-dev": {
"phpunit/phpunit": "^6.0"
@@ -1233,24 +1367,34 @@
],
"description": "Allows reflection of object attributes, including inherited and non-public ones",
"homepage": "https://github.com/sebastianbergmann/object-reflector/",
- "time": "2017-03-29T09:07:27+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/object-reflector/issues",
+ "source": "https://github.com/sebastianbergmann/object-reflector/tree/1.1.2"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-11-30T07:37:18+00:00"
},
{
"name": "sebastian/recursion-context",
- "version": "3.0.0",
+ "version": "3.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/recursion-context.git",
- "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8"
+ "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8",
- "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8",
+ "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/367dcba38d6e1977be014dc4b22f47a484dac7fb",
+ "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb",
"shasum": ""
},
"require": {
- "php": "^7.0"
+ "php": ">=7.0"
},
"require-dev": {
"phpunit/phpunit": "^6.0"
@@ -1271,14 +1415,14 @@
"BSD-3-Clause"
],
"authors": [
- {
- "name": "Jeff Welch",
- "email": "whatthejeff@gmail.com"
- },
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
},
+ {
+ "name": "Jeff Welch",
+ "email": "whatthejeff@gmail.com"
+ },
{
"name": "Adam Harvey",
"email": "aharvey@php.net"
@@ -1286,29 +1430,39 @@
],
"description": "Provides functionality to recursively process PHP variables",
"homepage": "http://www.github.com/sebastianbergmann/recursion-context",
- "time": "2017-03-03T06:23:57+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/recursion-context/issues",
+ "source": "https://github.com/sebastianbergmann/recursion-context/tree/3.0.1"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-11-30T07:34:24+00:00"
},
{
"name": "sebastian/resource-operations",
- "version": "1.0.0",
+ "version": "2.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/resource-operations.git",
- "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52"
+ "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52",
- "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52",
+ "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/31d35ca87926450c44eae7e2611d45a7a65ea8b3",
+ "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3",
"shasum": ""
},
"require": {
- "php": ">=5.6.0"
+ "php": ">=7.1"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0.x-dev"
+ "dev-master": "2.0-dev"
}
},
"autoload": {
@@ -1328,7 +1482,73 @@
],
"description": "Provides a list of PHP built-in functions that operate on resources",
"homepage": "https://www.github.com/sebastianbergmann/resource-operations",
- "time": "2015-07-28T20:34:47+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/resource-operations/issues",
+ "source": "https://github.com/sebastianbergmann/resource-operations/tree/2.0.2"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-11-30T07:30:19+00:00"
+ },
+ {
+ "name": "sebastian/type",
+ "version": "1.1.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/type.git",
+ "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/0150cfbc4495ed2df3872fb31b26781e4e077eb4",
+ "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^8.2"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.1-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Collection of value objects that represent the types of the PHP type system",
+ "homepage": "https://github.com/sebastianbergmann/type",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/type/issues",
+ "source": "https://github.com/sebastianbergmann/type/tree/1.1.4"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-11-30T07:25:11+00:00"
},
{
"name": "sebastian/version",
@@ -1371,27 +1591,113 @@
],
"description": "Library that helps with managing the version number of Git-hosted PHP projects",
"homepage": "https://github.com/sebastianbergmann/version",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/version/issues",
+ "source": "https://github.com/sebastianbergmann/version/tree/master"
+ },
"time": "2016-10-03T07:35:21+00:00"
},
{
- "name": "theseer/tokenizer",
- "version": "1.1.0",
+ "name": "symfony/polyfill-ctype",
+ "version": "v1.25.0",
"source": {
"type": "git",
- "url": "https://github.com/theseer/tokenizer.git",
- "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b"
+ "url": "https://github.com/symfony/polyfill-ctype.git",
+ "reference": "30885182c981ab175d4d034db0f6f469898070ab"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b",
- "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b",
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab",
+ "reference": "30885182c981ab175d4d034db0f6f469898070ab",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "provide": {
+ "ext-ctype": "*"
+ },
+ "suggest": {
+ "ext-ctype": "For best performance"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.23-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Ctype\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Gert de Pagter",
+ "email": "BackEndTea@gmail.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill for ctype functions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "ctype",
+ "polyfill",
+ "portable"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2021-10-20T20:35:02+00:00"
+ },
+ {
+ "name": "theseer/tokenizer",
+ "version": "1.2.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/theseer/tokenizer.git",
+ "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e",
+ "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-tokenizer": "*",
"ext-xmlwriter": "*",
- "php": "^7.0"
+ "php": "^7.2 || ^8.0"
},
"type": "library",
"autoload": {
@@ -1411,33 +1717,47 @@
}
],
"description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
- "time": "2017-04-07T12:08:54+00:00"
+ "support": {
+ "issues": "https://github.com/theseer/tokenizer/issues",
+ "source": "https://github.com/theseer/tokenizer/tree/1.2.1"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/theseer",
+ "type": "github"
+ }
+ ],
+ "time": "2021-07-28T10:34:58+00:00"
},
{
"name": "webmozart/assert",
- "version": "1.3.0",
+ "version": "1.10.0",
"source": {
"type": "git",
- "url": "https://github.com/webmozart/assert.git",
- "reference": "0df1908962e7a3071564e857d86874dad1ef204a"
+ "url": "https://github.com/webmozarts/assert.git",
+ "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a",
- "reference": "0df1908962e7a3071564e857d86874dad1ef204a",
+ "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25",
+ "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25",
"shasum": ""
},
"require": {
- "php": "^5.3.3 || ^7.0"
+ "php": "^7.2 || ^8.0",
+ "symfony/polyfill-ctype": "^1.8"
+ },
+ "conflict": {
+ "phpstan/phpstan": "<0.12.20",
+ "vimeo/psalm": "<4.6.1 || 4.6.2"
},
"require-dev": {
- "phpunit/phpunit": "^4.6",
- "sebastian/version": "^1.0.1"
+ "phpunit/phpunit": "^8.5.13"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.3-dev"
+ "dev-master": "1.10-dev"
}
},
"autoload": {
@@ -1461,15 +1781,19 @@
"check",
"validate"
],
- "time": "2018-01-29T19:49:41+00:00"
+ "support": {
+ "issues": "https://github.com/webmozarts/assert/issues",
+ "source": "https://github.com/webmozarts/assert/tree/1.10.0"
+ },
+ "time": "2021-03-09T10:59:23+00:00"
}
],
- "packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
- "platform-dev": []
+ "platform-dev": [],
+ "plugin-api-version": "2.1.0"
}
diff --git a/test/core/BulkChangeTest.inc.php b/test/core/BulkChangeTest.inc.php
index 2010b2d40..9d2dd1b99 100644
--- a/test/core/BulkChangeTest.inc.php
+++ b/test/core/BulkChangeTest.inc.php
@@ -14,7 +14,8 @@ use MetaModel;
class BulkChangeTest extends ItopDataTestCase {
const CREATE_TEST_ORG = true;
- protected function setUp() {
+ protected function setUp(): void
+ {
parent::setUp();
require_once(APPROOT.'core/bulkchange.class.inc.php');
diff --git a/test/core/CMDBObjectTest.php b/test/core/CMDBObjectTest.php
new file mode 100644
index 000000000..237b51ca4
--- /dev/null
+++ b/test/core/CMDBObjectTest.php
@@ -0,0 +1,75 @@
+Set('name', 'PHPUnit test');
+ $oTestObject->Set('org_id', 1);
+ $oTestObject->Set('url', 'https://www.combodo.com');
+ $oTestObject->DBWrite();
+ self::assertFalse(CMDBObject::GetCurrentChange()->IsNew(), 'TrackInfo : Current change persisted');
+ self::assertEquals($sTrackInfo, CMDBObject::GetCurrentChange()->Get('userinfo'),
+ 'TrackInfo : current change created with expected trackinfo');
+
+ //-- new object with non persisted current change
+ $sTrackInfo2 = $sTrackInfo.'_2';
+ /** @var \CMDBChange $oCustomChange */
+ $oCustomChange = MetaModel::NewObject('CMDBChange');
+ $oCustomChange->Set('date', time());
+ $oCustomChange->Set('userinfo', $sTrackInfo2);
+ CMDBObject::SetCurrentChange($oCustomChange);
+ $oTestObject->Set('url', 'https://fr.wikipedia.org');
+ $oTestObject->DBUpdate();
+ self::assertFalse(CMDBObject::GetCurrentChange()->IsNew(), 'SetCurrentChange : Current change persisted');
+ self::assertEquals($sTrackInfo2, CMDBObject::GetCurrentChange()->Get('userinfo'),
+ 'SetCurrentChange : current change created with expected trackinfo');
+
+ //-- new object with current change init using helper method
+ $sTrackInfo3 = $sTrackInfo.'_3';
+ CMDBObject::SetCurrentChangeFromParams($sTrackInfo3);
+ $oTestObject->Set('url', 'https://en.wikipedia.org');
+ $oTestObject->DBUpdate();
+ self::assertFalse(CMDBObject::GetCurrentChange()->IsNew(), 'SetCurrentChangeFromParams : Current change persisted');
+ self::assertEquals($sTrackInfo3, CMDBObject::GetCurrentChange()->Get('userinfo'),
+ 'SetCurrentChangeFromParams : current change created with expected trackinfo');
+
+ // restore initial conditions
+ $oTestObject->DBDelete();
+ CMDBObject::SetCurrentChange($oInitialCurrentChange);
+ CMDBObject::SetTrackInfo($sInitialTrackInfo);
+ }
+}
\ No newline at end of file
diff --git a/test/core/CMDBSource/CMDBSourceTest.php b/test/core/CMDBSource/CMDBSourceTest.php
index 81410ec13..588c8dac7 100644
--- a/test/core/CMDBSource/CMDBSourceTest.php
+++ b/test/core/CMDBSource/CMDBSourceTest.php
@@ -21,7 +21,7 @@ use utils;
*/
class CMDBSourceTest extends ItopTestCase
{
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
diff --git a/test/core/CMDBSource/TransactionsTest.php b/test/core/CMDBSource/TransactionsTest.php
index e1495b154..e7c4a11e1 100644
--- a/test/core/CMDBSource/TransactionsTest.php
+++ b/test/core/CMDBSource/TransactionsTest.php
@@ -27,10 +27,10 @@ class TransactionsTest extends ItopTestCase
/** @var DeadLockInjection */
private $oMySQLiMock;
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
- require_once ('DeadLockInjection.php');
+ require_once('DeadLockInjection.php');
require_once(APPROOT.'/core/cmdbsource.class.inc.php');
$sEnv = 'production';
$sConfigFile = APPCONF.$sEnv.'/config-itop.php';
diff --git a/test/core/ConfigPlaceholdersResolverTest.php b/test/core/ConfigPlaceholdersResolverTest.php
index 6f10409c4..0e99c5623 100644
--- a/test/core/ConfigPlaceholdersResolverTest.php
+++ b/test/core/ConfigPlaceholdersResolverTest.php
@@ -23,7 +23,6 @@ namespace Combodo\iTop\Test\UnitTest\Core;
use Combodo\iTop\Test\UnitTest\ItopTestCase;
use ConfigPlaceholdersResolver;
-use PHPUnit\Framework\TestCase;
/**
* @runTestsInSeparateProcesses
@@ -32,10 +31,10 @@ use PHPUnit\Framework\TestCase;
*/
class ConfigPlaceholdersResolverTest extends ItopTestCase
{
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
- require_once (APPROOT.'core/config.class.inc.php');
+ require_once(APPROOT.'core/config.class.inc.php');
}
/**
* @dataProvider providerResolve
diff --git a/test/core/ConfigTest.php b/test/core/ConfigTest.php
index 6606e7947..77026e81d 100644
--- a/test/core/ConfigTest.php
+++ b/test/core/ConfigTest.php
@@ -31,10 +31,10 @@ use Config;
*/
class ConfigTest extends ItopTestCase
{
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
- require_once (APPROOT.'core/config.class.inc.php');
+ require_once(APPROOT.'core/config.class.inc.php');
}
/**
diff --git a/test/core/DBObjectTest.php b/test/core/DBObjectTest.php
index 132983474..752ee47e9 100644
--- a/test/core/DBObjectTest.php
+++ b/test/core/DBObjectTest.php
@@ -42,7 +42,7 @@ class DBObjectTest extends ItopDataTestCase
{
const CREATE_TEST_ORG = true;
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
require_once(APPROOT.'core/dbobject.class.php');
diff --git a/test/core/DBSearchIntersectTest.php b/test/core/DBSearchIntersectTest.php
index ed65813c0..55c4fba52 100644
--- a/test/core/DBSearchIntersectTest.php
+++ b/test/core/DBSearchIntersectTest.php
@@ -19,7 +19,7 @@ use DBSearch;
class DBSearchIntersectTest extends ItopTestCase
{
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
require_once(APPROOT.'application/startup.inc.php');
@@ -337,7 +337,6 @@ class DBSearchIntersectTest extends ItopTestCase
/**
* @dataProvider IntersectOptimizationProvider
- * @doesNotPerformAssertions
*
* @param string $sOQL
* @param string $sResult
diff --git a/test/core/DBSearchJoinTest.php b/test/core/DBSearchJoinTest.php
index d2f81e515..e9eb96585 100644
--- a/test/core/DBSearchJoinTest.php
+++ b/test/core/DBSearchJoinTest.php
@@ -20,7 +20,7 @@ class DBSearchJoinTest extends ItopDataTestCase {
const USE_TRANSACTION = false;
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
require_once(APPROOT.'application/startup.inc.php');
diff --git a/test/core/DBSearchTest.php b/test/core/DBSearchTest.php
index fd151a560..0ef928602 100644
--- a/test/core/DBSearchTest.php
+++ b/test/core/DBSearchTest.php
@@ -54,7 +54,7 @@ class DBSearchTest extends ItopDataTestCase
/**
* @throws \Exception
*/
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
diff --git a/test/core/DBSearchUpdateRealiasingMapTest.php b/test/core/DBSearchUpdateRealiasingMapTest.php
index dd090bdc9..7187e466d 100644
--- a/test/core/DBSearchUpdateRealiasingMapTest.php
+++ b/test/core/DBSearchUpdateRealiasingMapTest.php
@@ -19,7 +19,7 @@ class DBSearchUpdateRealiasingMapTest extends ItopDataTestCase
{
const USE_TRANSACTION = false;
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
require_once(APPROOT.'application/startup.inc.php');
diff --git a/test/core/Log/LogAPITest.php b/test/core/Log/LogAPITest.php
index 158d2d9f7..60fac6323 100644
--- a/test/core/Log/LogAPITest.php
+++ b/test/core/Log/LogAPITest.php
@@ -27,7 +27,7 @@ class LogAPITest extends ItopDataTestCase
private $mockFileLog;
private $oMetaModelConfig;
- protected function setUp()
+ protected function setUp():void
{
parent::setUp();
diff --git a/test/core/Log/LogFileNameBuilderTest.php b/test/core/Log/LogFileNameBuilderTest.php
index d150d70a9..e7bdfa923 100644
--- a/test/core/Log/LogFileNameBuilderTest.php
+++ b/test/core/Log/LogFileNameBuilderTest.php
@@ -28,21 +28,20 @@ class LogFileNameBuilderTest extends ItopTestCase
clearstatcache(true, $sLogFile);
}
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
require_once APPROOT.'core/log.class.inc.php';
}
- protected function tearDown()
+ protected function tearDown(): void
{
parent::tearDown();
// remove log files created in the test
$aTestLogFiles = glob(__DIR__.DIRECTORY_SEPARATOR.self::TEST_LOGFILE_PREFIX.'*.'.self::TEST_LOGFILE_EXTENSION);
- foreach ($aTestLogFiles as $sLogFile)
- {
+ foreach ($aTestLogFiles as $sLogFile) {
unlink($sLogFile);
}
}
diff --git a/test/core/MetaModelTest.php b/test/core/MetaModelTest.php
index 77d312513..02b5c2622 100644
--- a/test/core/MetaModelTest.php
+++ b/test/core/MetaModelTest.php
@@ -24,7 +24,7 @@ class MetaModelTest extends ItopDataTestCase
protected static $sDefaultUserRequestTitle = 'Unit test title';
protected static $sDefaultUserRequestDescription = 'Unit test description';
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
require_once APPROOT.'/core/metamodel.class.php';
diff --git a/test/core/TriggerTest.php b/test/core/TriggerTest.php
index 0046993f7..341dccfbf 100644
--- a/test/core/TriggerTest.php
+++ b/test/core/TriggerTest.php
@@ -2,11 +2,9 @@
namespace Combodo\iTop\Test\UnitTest\Core;
-use Combodo\iTop\Portal\Controller\ObjectController;
use Combodo\iTop\Test\UnitTest\ItopDataTestCase;
use ContextTag;
use MetaModel;
-use PHPUnit\Exception;
use TriggerOnObjectCreate;
/**
@@ -24,7 +22,7 @@ class TriggerTest extends ItopDataTestCase
const USE_TRANSACTION = false;
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
}
diff --git a/test/core/UniquenessConstraintTest.php b/test/core/UniquenessConstraintTest.php
index f0384796a..e497ea4df 100644
--- a/test/core/UniquenessConstraintTest.php
+++ b/test/core/UniquenessConstraintTest.php
@@ -16,7 +16,7 @@ use MetaModel;
*/
class UniquenessConstraintTest extends ItopTestCase
{
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
require_once(APPROOT.'/core/metamodel.class.php');
diff --git a/test/core/UserRightsTest.php b/test/core/UserRightsTest.php
index 20a12034d..0c54ebf8f 100644
--- a/test/core/UserRightsTest.php
+++ b/test/core/UserRightsTest.php
@@ -47,7 +47,7 @@ use utils;
*/
class UserRightsTest extends ItopDataTestCase
{
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
diff --git a/test/core/WeeklyScheduledProcessTest.php b/test/core/WeeklyScheduledProcessTest.php
index af29e6e98..09c6502e4 100644
--- a/test/core/WeeklyScheduledProcessTest.php
+++ b/test/core/WeeklyScheduledProcessTest.php
@@ -7,7 +7,7 @@ use DateTime;
class WeeklyScheduledProcessTest extends ItopTestCase
{
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
require_once(APPROOT.'core/backgroundprocess.inc.php');
diff --git a/test/core/apcEmulationTest.php b/test/core/apcEmulationTest.php
index 1fbcc5840..1e44faa55 100644
--- a/test/core/apcEmulationTest.php
+++ b/test/core/apcEmulationTest.php
@@ -27,7 +27,6 @@
namespace Combodo\iTop\Test\UnitTest\Core;
use Combodo\iTop\Test\UnitTest\ItopTestCase;
-use PHPUnit\Framework\TestCase;
define('UNIT_MAX_CACHE_FILES', 10);
@@ -40,7 +39,7 @@ define('UNIT_MAX_CACHE_FILES', 10);
class apcEmulationTest extends ItopTestCase
{
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
require_once(APPROOT.'core/apc-emulation.php');
@@ -48,7 +47,7 @@ class apcEmulationTest extends ItopTestCase
apc_clear_cache();
}
- public function tearDown()
+ public function tearDown(): void
{
apc_clear_cache();
}
diff --git a/test/core/dictApcuTest.php b/test/core/dictApcuTest.php
index 942cd5841..c7f74e899 100644
--- a/test/core/dictApcuTest.php
+++ b/test/core/dictApcuTest.php
@@ -41,7 +41,7 @@ class dictApcuTest extends ItopTestCase
private $oApcService;
private $sDictionaryFolder;
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
@@ -108,12 +108,12 @@ PHP;
file_put_contents($sDictionaryFolder . DIRECTORY_SEPARATOR . "$sLanguageCodeInFilename.dict.php", $sContent);
}
- protected function tearDown()
+ protected function tearDown(): void
{
- foreach (glob(APPROOT."env-$this->sEnvName" . DIRECTORY_SEPARATOR . "dictionaries" . DIRECTORY_SEPARATOR . "*") as $sFile){
+ foreach (glob(APPROOT."env-$this->sEnvName".DIRECTORY_SEPARATOR."dictionaries".DIRECTORY_SEPARATOR."*") as $sFile) {
unlink($sFile);
}
- rmdir(APPROOT."env-$this->sEnvName" . DIRECTORY_SEPARATOR . "dictionaries");
+ rmdir(APPROOT."env-$this->sEnvName".DIRECTORY_SEPARATOR."dictionaries");
rmdir(APPROOT."env-$this->sEnvName");
}
diff --git a/test/core/dictTest.php b/test/core/dictTest.php
index d30daede9..6c6588db7 100644
--- a/test/core/dictTest.php
+++ b/test/core/dictTest.php
@@ -39,8 +39,7 @@ use Exception;
class dictTest extends ItopTestCase
{
private $sEnvName;
-
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
@@ -74,7 +73,7 @@ PHP;
$_SESSION['itop_env'] = $this->sEnvName;
}
- protected function tearDown()
+ protected function tearDown(): void
{
foreach (glob(APPROOT."env-$this->sEnvName".DIRECTORY_SEPARATOR."dictionaries".DIRECTORY_SEPARATOR."*") as $sFile) {
unlink($sFile);
diff --git a/test/core/iTopConfigParserTest.php b/test/core/iTopConfigParserTest.php
index ee393a1b2..5c7810ac8 100644
--- a/test/core/iTopConfigParserTest.php
+++ b/test/core/iTopConfigParserTest.php
@@ -14,10 +14,11 @@ class iTopConfigParserTest extends ItopTestCase
private $tmpSavePath;
private $sConfigPath;
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
require_once APPROOT.'/core/iTopConfigParser.php';
+ require_once APPROOT.'/setup/runtimeenv.class.inc.php';
clearstatcache();
$this->sConfigPath = utils::GetConfigFilePath();
@@ -32,7 +33,7 @@ class iTopConfigParserTest extends ItopTestCase
clearstatcache();
}
- public function tearDown()
+ public function tearDown(): void
{
parent::tearDown();
if ($this->conf_exists) {
@@ -150,8 +151,6 @@ class iTopConfigParserTest extends ItopTestCase
}
/**
- * @doesNotPerformAssertions
- *
* @throws \ConfigException
* @throws \CoreException
*/
@@ -202,21 +201,15 @@ CONF;
}
/**
- * @doesNotPerformAssertions
- *
* @throws \ConfigException
* @throws \CoreException
*/
public function testConfigWriteToFile_FromScratchInstallation()
{
- $sConfigPath = utils::GetConfigFilePath();
- $oConfig = new Config($sConfigPath, false);
- try{
- clearstatcache();
- $oConfig->WriteToFile();
- }catch(\Exception $e)
- {
- $this->assertTrue(false, "failed writetofile with no initial file: " . $e->getMessage());
- }
+ $oConfig = new Config();
+ clearstatcache();
+ $oTestEnv = new RunTimeEnvironment('test-phpunit');
+ $oTestEnv->WriteConfigFileSafe($oConfig);
+ $this->assertTrue(true, "Config file was written");
}
}
diff --git a/test/core/ormLinkSetTest.php b/test/core/ormLinkSetTest.php
index afc980d69..925617e57 100644
--- a/test/core/ormLinkSetTest.php
+++ b/test/core/ormLinkSetTest.php
@@ -47,12 +47,12 @@ class ormLinkSetTest extends ItopDataTestCase
const CREATE_TEST_ORG = true;
/**
- * @throws Exception
- */
- protected function setUp()
- {
- parent::setUp();
- }
+ * @throws Exception
+ */
+ protected function setUp(): void
+ {
+ parent::setUp();
+ }
/**
*
diff --git a/test/core/ormTagSetTest.php b/test/core/ormTagSetTest.php
index eab998e2a..5486659e7 100644
--- a/test/core/ormTagSetTest.php
+++ b/test/core/ormTagSetTest.php
@@ -50,7 +50,7 @@ class ormTagSetTest extends ItopDataTestCase
/**
* @throws Exception
*/
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
diff --git a/test/core/sanitizer/AbstractDOMSanitizerTest.php b/test/core/sanitizer/AbstractDOMSanitizerTest.php
index bff69cf43..082f54e01 100644
--- a/test/core/sanitizer/AbstractDOMSanitizerTest.php
+++ b/test/core/sanitizer/AbstractDOMSanitizerTest.php
@@ -9,7 +9,7 @@ abstract class AbstractDOMSanitizerTest extends ItopTestCase
const INPUT_DIRECTORY = 'input';
const OUTPUT_DIRECTORY = 'output';
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
require_once(APPROOT.'application/utils.inc.php');
diff --git a/test/coreExtensions/UserLocalTest.php b/test/coreExtensions/UserLocalTest.php
index bd24a563e..89ce3404b 100644
--- a/test/coreExtensions/UserLocalTest.php
+++ b/test/coreExtensions/UserLocalTest.php
@@ -21,13 +21,12 @@ use UserLocal;
class UserLocalTest extends ItopDataTestCase
{
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
- require_once(APPROOT.'application/startup.inc.php');
- require_once (APPROOT.'test/coreExtensions/UserLocalTest/UserLocalPasswordPolicyMock.php');
- require_once (APPROOT.'env-production/authent-local/model.authent-local.php');
+ require_once(APPROOT.'test/coreExtensions/UserLocalTest/UserLocalPasswordPolicyMock.php');
+ require_once(APPROOT.'env-production/authent-local/model.authent-local.php');
}
/**
diff --git a/test/integration/iTopModulesXmlVersionChecklistTest.php b/test/integration/iTopModulesXmlVersionChecklistTest.php
index a0e9ba39e..895370a43 100644
--- a/test/integration/iTopModulesXmlVersionChecklistTest.php
+++ b/test/integration/iTopModulesXmlVersionChecklistTest.php
@@ -29,7 +29,7 @@ use iTopDesignFormat;
*/
class iTopModulesXmlVersionIntegrationTest extends ItopTestCase
{
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
diff --git a/test/itop-config/Validator/iTopConfigAstValidatorTest.php b/test/itop-config/Validator/iTopConfigAstValidatorTest.php
index e06f7e0b6..c29d285d6 100644
--- a/test/itop-config/Validator/iTopConfigAstValidatorTest.php
+++ b/test/itop-config/Validator/iTopConfigAstValidatorTest.php
@@ -15,7 +15,7 @@ use PhpParser\PrettyPrinter\Standard;
class iTopConfigAstValidatorTest extends ItopTestCase
{
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
diff --git a/test/itop-config/Validator/iTopConfigSyntaxValidatorTest.php b/test/itop-config/Validator/iTopConfigSyntaxValidatorTest.php
index 74e779c38..77427cd94 100644
--- a/test/itop-config/Validator/iTopConfigSyntaxValidatorTest.php
+++ b/test/itop-config/Validator/iTopConfigSyntaxValidatorTest.php
@@ -16,7 +16,7 @@ use PhpParser\PrettyPrinter\Standard;
class iTopConfigSyntaxValidatorTest extends ItopTestCase
{
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
diff --git a/test/itop-tickets/itopTicketTest.php b/test/itop-tickets/itopTicketTest.php
index d7509c259..b57c8a274 100644
--- a/test/itop-tickets/itopTicketTest.php
+++ b/test/itop-tickets/itopTicketTest.php
@@ -43,14 +43,6 @@ class ItopTicketTest extends ItopDataTestCase
{
const CREATE_TEST_ORG = true;
- /**
- * @throws Exception
- */
- protected function setUp()
- {
- parent::setUp();
- }
-
/**
*
* Given:
diff --git a/test/phpunit.xml.dist b/test/phpunit.xml.dist
index fec60578f..753fa5c17 100644
--- a/test/phpunit.xml.dist
+++ b/test/phpunit.xml.dist
@@ -1,68 +1,53 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+
+
+
-
- ../env-production/*/test
+
+ application
core
-
- webservices
+
+ coreExtensions
-
- itop-tickets
+
+ integration
-
+
itop-config
-
- application
+
+ itop-tickets
+
+ setup
+
sources
@@ -72,14 +57,12 @@
synchro
-
- setup
+
+ webservices
-
- integration
-
-
- coreExtensions
+
+
+ ../env-production/*/test
diff --git a/test/postbuild_integration.xml.dist b/test/postbuild_integration.xml.dist
index e5b8f8e7b..34aab85da 100644
--- a/test/postbuild_integration.xml.dist
+++ b/test/postbuild_integration.xml.dist
@@ -1,44 +1,21 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/test/postbuild_integration/iTopDesignFormatChecklistTest.php b/test/postbuild_integration/iTopDesignFormatChecklistTest.php
index 48e7a77f6..20b1063c1 100644
--- a/test/postbuild_integration/iTopDesignFormatChecklistTest.php
+++ b/test/postbuild_integration/iTopDesignFormatChecklistTest.php
@@ -17,7 +17,7 @@ use PHPUnit\Exception;
*/
class TestForITopDesignFormatClass extends ItopTestCase
{
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
@@ -148,6 +148,7 @@ class TestForITopDesignFormatClass extends ItopTestCase
{
if (is_dir($sPath))
{
+ /** @noinspection SlowArrayOperationsInLoopInspection */
$aDataModelFiles = array_merge($aDataModelFiles, $this->GetDataModelFiles($sPath));
}
else if (preg_match("/datamodel\..*\.xml/", basename($sPath)))
diff --git a/test/replay_query_log.php b/test/replay_query_log.php
index 680641044..55e7e1984 100644
--- a/test/replay_query_log.php
+++ b/test/replay_query_log.php
@@ -147,6 +147,7 @@ class QueryLogEntry
$iRepeat = utils::ReadParam('repeat', 3);
try
{
+ $resQuery = null;
$fRefTime = MyHelpers::getmicrotime();
for($i = 0 ; $i < $iRepeat ; $i++)
{
@@ -167,7 +168,6 @@ class QueryLogEntry
catch (Exception $e)
{
$this->aErrors[] = "Failed to execute the SQL:".$e->getMessage();
- $resQuery = null;
}
if ($resQuery)
{
diff --git a/test/setup/DBBackupTest.php b/test/setup/DBBackupTest.php
index 7f767f439..3ad7a2115 100644
--- a/test/setup/DBBackupTest.php
+++ b/test/setup/DBBackupTest.php
@@ -19,12 +19,10 @@ class DBBackupTest extends ItopTestCase
* @throws \MySQLException
* @throws \ConfigException
*/
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
- require_once(APPROOT.'core/config.class.inc.php');
require_once(APPROOT.'setup/backup.class.inc.php');
- require_once(APPROOT.'core/cmdbsource.class.inc.php'); // DBBackup dependency
// We need a connection to the DB, so let's open it !
// We are using the default config file... as the server might not be configured for all the combination we are testing
diff --git a/test/setup/SetupUtilsTest.php b/test/setup/SetupUtilsTest.php
index e5a7f85bc..cb95fc68e 100644
--- a/test/setup/SetupUtilsTest.php
+++ b/test/setup/SetupUtilsTest.php
@@ -22,7 +22,7 @@ class SetupUtilsTest extends ItopTestCase
const INFO = 2;
const TRACE = 3; // for log purposes : replace old SetupLog::Log calls
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
diff --git a/test/setup/iTopDesignFormat/iTopDesignFormatTest.php b/test/setup/iTopDesignFormat/iTopDesignFormatTest.php
index d302dd2fd..13070bf60 100644
--- a/test/setup/iTopDesignFormat/iTopDesignFormatTest.php
+++ b/test/setup/iTopDesignFormat/iTopDesignFormatTest.php
@@ -18,7 +18,7 @@ use iTopDesignFormat;
*/
class TestForITopDesignFormatClass extends ItopTestCase
{
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
diff --git a/test/unittestautoload.php b/test/unittestautoload.php
index 4c523c2e8..3fbf99cca 100644
--- a/test/unittestautoload.php
+++ b/test/unittestautoload.php
@@ -1,7 +1,5 @@
sLogin = "rest-user-" . date('dmYHis');
- $this->CreateTestOrganization();
+ protected function setUp(): void
+ {
+ parent::setUp();
- if (!empty($this->sTmpFile)){
- unlink($this->sTmpFile);
- }
+ $this->sLogin = "rest-user-".date('dmYHis');
+ $this->CreateTestOrganization();
+
+ if (!empty($this->sTmpFile)) {
+ unlink($this->sTmpFile);
+ }
$sConfigFile = \utils::GetConfig()->GetLoadedFile();
@chmod($sConfigFile, 0770);
diff --git a/webservices/cron.php b/webservices/cron.php
index eddd6722e..b1c6da3e9 100644
--- a/webservices/cron.php
+++ b/webservices/cron.php
@@ -266,9 +266,7 @@ function CronExec($oP, $bVerbose, $bDebug=false)
// N°3219 for each process will use a specific CMDBChange object with a specific track info
// Any BackgroundProcess can overrides this as needed
- CMDBObject::SetCurrentChange(null);
- CMDBObject::SetTrackInfo("Background task ($sTaskClass)");
- CMDBObject::SetTrackOrigin(null);
+ CMDBObject::SetCurrentChangeFromParams("Background task ($sTaskClass)");
// Run the task and record its next run time
if ($bVerbose)