mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 11:38:44 +02:00
N°6716 - High memory Consomption and performance issue
This commit is contained in:
@@ -12,6 +12,7 @@ use Combodo\iTop\Test\UnitTest\ItopDataTestCase;
|
||||
use ContactType;
|
||||
use CoreException;
|
||||
use DBObject;
|
||||
use DBObject\MockDBObjectWithCRUDEventListener;
|
||||
use DBObjectSet;
|
||||
use DBSearch;
|
||||
use lnkPersonToTeam;
|
||||
@@ -521,6 +522,24 @@ class CRUDEventTest extends ItopDataTestCase
|
||||
|
||||
$this->assertEquals(2, self::$aEventCalls[EVENT_DB_LINKS_CHANGED]);
|
||||
}
|
||||
|
||||
// Tests with MockDBObject
|
||||
public function testFireCRUDEvent()
|
||||
{
|
||||
$this->RequireOnceUnitTestFile('DBObject/MockDBObjectWithCRUDEventListener.php');
|
||||
|
||||
// For Metamodel list of classes
|
||||
MockDBObjectWithCRUDEventListener::Init();
|
||||
$oDBObject = new MockDBObjectWithCRUDEventListener();
|
||||
$oDBObject2 = new MockDBObjectWithCRUDEventListener();
|
||||
|
||||
$oDBObject->FireEvent(MockDBObjectWithCRUDEventListener::TEST_EVENT);
|
||||
|
||||
$this->assertNotNull($oDBObject->oEventDataReceived);
|
||||
$this->assertNull($oDBObject2->oEventDataReceived);
|
||||
|
||||
//echo($oDBObject->oEventDataReceived->Get('debug_info'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user