Fix unit tests

This commit is contained in:
buchmann 2025-10-07 09:53:03 +02:00
parent 07540bdf91
commit 6fd2bb9cf3
2 changed files with 6 additions and 1 deletions

View file

@ -38,7 +38,7 @@ class SIFormatter
*/ */
public function getMagnitude(float $value): int public function getMagnitude(float $value): int
{ {
return (int) floor(log10(abs($value))); return intval(floor(log10(abs($value))));
} }
/** /**

View file

@ -49,6 +49,11 @@ class TagFinder
public function searchTags(string $keyword, array $options = []): array public function searchTags(string $keyword, array $options = []): array
{ {
$results = []; $results = [];
$resolver = new OptionsResolver();
$this->configureOptions($resolver);
$options = $resolver->resolve($options);
$keyword_regex = '/^'.preg_quote($keyword, '/').'/'; $keyword_regex = '/^'.preg_quote($keyword, '/').'/';
$possible_tags = $this->listTags($keyword, $options); $possible_tags = $this->listTags($keyword, $options);