Skip to content

Commit

Permalink
Fix FIXME
Browse files Browse the repository at this point in the history
  • Loading branch information
trasher committed Jul 2, 2024
1 parent 11069ad commit a88f951
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions phpunit/InventoryTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,7 @@ public function tearDown(): void

parent::tearDown();

//FIXME: no longer possible with phpunit
/*
if (str_starts_with($method, 'testImport')) {
//$this->dump('Checking for unexpected logs');
if (str_starts_with($this->getName(), 'testImport')) {
$nblogsnow = countElementsInTable(\Log::getTable());
$logs = $DB->request([
'FROM' => \Log::getTable(),
Expand All @@ -89,19 +86,22 @@ public function tearDown(): void
]
]
]);
$this->integer(count($logs))->isIdenticalTo(0, print_r(iterator_to_array($logs), true));
$this->assertSame(
0,
count($logs),
print_r(iterator_to_array($logs), true)
);
}

if (str_starts_with($method, 'testUpdate')) {
if (str_starts_with($this->getName(), 'testUpdate')) {
$nblogsnow = countElementsInTable(\Log::getTable());
$logs = $DB->request([
'FROM' => \Log::getTable(),
'LIMIT' => $nblogsnow,
'OFFSET' => $this->nblogs,
]);
$this->integer(count($logs))->isIdenticalTo(0);
$this->assertSame(0, count($logs));
}
*/

$files = new \RecursiveIteratorIterator(
new \RecursiveDirectoryIterator(GLPI_INVENTORY_DIR, \RecursiveDirectoryIterator::SKIP_DOTS),
Expand Down

0 comments on commit a88f951

Please sign in to comment.