Skip to content

Commit

Permalink
Replace usage of deprecated UnifiedArchive::archiveFiles() method
Browse files Browse the repository at this point in the history
  • Loading branch information
trasher authored Jun 24, 2024
1 parent 6d37fc6 commit d8dafd6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/InventoryTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

class InventoryTestCase extends \DbTestCase
{
protected const INV_FIXTURES = GLPI_ROOT . '/vendor/glpi-project/inventory_format/examples/';
protected const INV_FIXTURES = GLPI_ROOT . 'vendor/glpi-project/inventory_format/examples/';

/**
* Path to use to test inventory archive manipulations.
Expand Down
8 changes: 4 additions & 4 deletions tests/functional/Glpi/Inventory/Inventory.php
Original file line number Diff line number Diff line change
Expand Up @@ -4584,12 +4584,12 @@ public function testArchive()
$nbnetequps = countElementsInTable(\NetworkEquipment::getTable());

$json_paths = [
self::INV_FIXTURES . 'computer_1.json',
self::INV_FIXTURES . 'networkequipment_1.json',
self::INV_FIXTURES . 'printer_1.json',
realpath(self::INV_FIXTURES . 'computer_1.json'),
realpath(self::INV_FIXTURES . 'networkequipment_1.json'),
realpath(self::INV_FIXTURES . 'printer_1.json'),
];

UnifiedArchive::archiveFiles($json_paths, self::INVENTORY_ARCHIVE_PATH);
UnifiedArchive::create($json_paths, self::INVENTORY_ARCHIVE_PATH);

$conf = new \Glpi\Inventory\Conf();
$result = $conf->importFiles(['to_inventory.zip' => self::INVENTORY_ARCHIVE_PATH]);
Expand Down

0 comments on commit d8dafd6

Please sign in to comment.