Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
trasher committed Oct 29, 2024
1 parent a6f3b2e commit c391022
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions phpunit/functional/Glpi/Inventory/InventoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5153,6 +5153,15 @@ public function testImportDatabases()
$this->assertIsArray($database);
$this->assertSame('glpi', $database['name']);
$this->assertSame(55000, $database['size']);

$computer = new \Computer();
global $DB;
$agents = $DB->request(['FROM' => \Agent::getTable()]);
$this->assertCount(1, $agents);
$agent = $agents->current();
$computers_id = $agent['items_id'];
$this->assertTrue($computer->getFromDB($computers_id));
$this->assertTrue($computer->delete(['id' => $computers_id], true));
}


Expand Down

0 comments on commit c391022

Please sign in to comment.