Skip to content

Commit

Permalink
Mark test as incomplete for not supported queries
Browse files Browse the repository at this point in the history
Instead of printing the query, it marks the test as incomplete, this way
we have a stack trace that help finding why it happened.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
  • Loading branch information
MauricioFauth committed Jan 19, 2022
1 parent 0036275 commit 04176cd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/classes/Stubs/DbiDummy.php
Expand Up @@ -15,6 +15,7 @@
use PhpMyAdmin\Dbal\DbiExtension;
use PhpMyAdmin\Dbal\ResultInterface;
use PhpMyAdmin\FieldMetadata;
use PHPUnit\Framework\Assert;

use function addslashes;
use function count;
Expand Down Expand Up @@ -239,9 +240,7 @@ public function realQuery(string $query, $link, int $options)
return new DummyResult($this, $i + self::OFFSET_GLOBAL);
}

echo 'Not supported query: ' . $query . "\n";

return false;
Assert::markTestIncomplete('Not supported query: ' . $query);
}

/**
Expand Down

0 comments on commit 04176cd

Please sign in to comment.