mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-18 23:08:46 +02:00
Merge remote-tracking branch 'origin/support/3.2' into develop
This commit is contained in:
@@ -79,21 +79,18 @@ class UpdateImpactedItemsTest extends ItopDataTestCase
|
||||
{
|
||||
/**
|
||||
* Server1 +----> Hypervisor1
|
||||
* Server2 +----> Hypervisor1
|
||||
*/
|
||||
$this->GivenCITreeInDB(<<<EOF
|
||||
Hypervisor_1 -> Server_1
|
||||
Hypervisor_1 -> Server_2
|
||||
EOF);
|
||||
$oTicket = $this->GivenTicketWithCIsOrPersons([
|
||||
'Server_1' => 'manual'
|
||||
'Hypervisor_1' => 'manual'
|
||||
]);
|
||||
|
||||
$oTicket->UpdateImpactedItems(); // impact analysis
|
||||
|
||||
$this->assertCIsOrPersonsListEquals($oTicket, [
|
||||
'Server_1' => 'manual',
|
||||
'Hypervisor_1' => 'computed'
|
||||
'Hypervisor_1' => 'manual',
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace Combodo\iTop\Test\UnitTest\Sources\Controller;
|
||||
|
||||
use Combodo\iTop\Portal\Controller\AggregatePageBrickController;
|
||||
use Combodo\iTop\Test\UnitTest\ItopDataTestCase;
|
||||
|
||||
class BootSymfonyKernelTest extends ItopDataTestCase
|
||||
{
|
||||
public function testInstantiateServiceWithAnExplicitCallToBootTheKernel()
|
||||
{
|
||||
$this->SetKernelClass(\Combodo\iTop\Portal\Kernel::class);
|
||||
self::bootKernel();
|
||||
$controller = static::getContainer()->get(AggregatePageBrickController::class);
|
||||
|
||||
$this->assertInstanceOf(AggregatePageBrickController::class, $controller);
|
||||
}
|
||||
|
||||
public function testInstantiateServiceWithAnAutomaticKernelBoot()
|
||||
{
|
||||
$this->SetKernelClass(\Combodo\iTop\Portal\Kernel::class);
|
||||
$controller = static::getContainer()->get(AggregatePageBrickController::class);
|
||||
|
||||
$this->assertInstanceOf(AggregatePageBrickController::class, $controller);
|
||||
}
|
||||
|
||||
public function testUnspecifiedKernelClassThrowsAnException()
|
||||
{
|
||||
$this->expectException(\LogicException::class);
|
||||
$this->expectExceptionMessage('static::SetKernelClass() must be called before booting the kernel');
|
||||
|
||||
static::getContainer();
|
||||
}
|
||||
|
||||
public function testTwoDifferentKernelsCanBeStartedConsecutively()
|
||||
{
|
||||
self::markTestSkipped('This test is still failing: the second kernel container does not find the requested service');
|
||||
|
||||
$this->SetKernelClass(\Combodo\iTop\Kernel::class);
|
||||
self::bootKernel();
|
||||
|
||||
$this->SetKernelClass(\Combodo\iTop\Portal\Kernel::class);
|
||||
self::bootKernel();
|
||||
$controller = static::getContainer()->get(AggregatePageBrickController::class);
|
||||
|
||||
$this->assertInstanceOf(AggregatePageBrickController::class, $controller);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user