mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-14 07:28:41 +00:00
test fixes
This commit is contained in:
parent
e9cb5443d0
commit
3511690182
|
|
@ -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']);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user