test fixes

This commit is contained in:
Dennis Eichhorn 2024-05-19 03:21:11 +02:00
parent e9cb5443d0
commit 3511690182
3 changed files with 5 additions and 7 deletions

View File

@ -131,10 +131,10 @@ final class RedisCache extends ConnectionAbstract
} }
if ($expire > 0) { if ($expire > 0) {
return $this->con->set((string) $key, $this->build($value), $expire); return $this->con->set((string) $key, $this->build($value), ['nx', 'ex' => $expire]);
} }
return $this->con->set((string) $key, $this->build($value)); return $this->con->set((string) $key, $this->build($value), ['nx']);
} }
/** /**

View File

@ -139,9 +139,8 @@ final class Numbers
} }
$exponent = ($number / $max) * $exp; $exponent = ($number / $max) * $exp;
$mapped = (\exp($exponent) - 1) / (\exp($exp) - 1) * 100;
return (\exp($exponent) - 1) / (\exp($exp) - 1) * 100;
return $mapped;
} }
/** /**

View File

@ -861,7 +861,7 @@ final class GraphTest extends \PHPUnit\Framework\TestCase
/** /**
* 1 - 3 - 5 * 1 - 3 - 5
* / |\ / * |\ /
* 0 | \ / * 0 | \ /
* \ | \ / * \ | \ /
* 2 4 * 2 4
@ -883,7 +883,6 @@ final class GraphTest extends \PHPUnit\Framework\TestCase
$this->graph->setNode($node4); $this->graph->setNode($node4);
$this->graph->setNode($node5); $this->graph->setNode($node5);
$node0->setNodeRelative($node1);
$node0->setNodeRelative($node2); $node0->setNodeRelative($node2);
$node1->setNodeRelative($node2); $node1->setNodeRelative($node2);
$node1->setNodeRelative($node3); $node1->setNodeRelative($node3);