use Symfony\Component\Lock\Strategy\ConsensusStrategy;
/**
* @author Jérémy Derussé <jeremy@derusse.com>
*/
class ConsensusStrategyTest extends TestCase
{
private ConsensusStrategy $strategy;
protected function setUp(): void
{
$this->strategy = new ConsensusStrategy();
}
public static function provideMetResults()
{
// success, failure, total, isMet
yield [3, 0, 3, true];
yield [2, 1, 3, true];
yield [2, 0, 3, true];
yield [1, 2, 3, false];
yield [1, 1, 3, false];
yield [1, 0, 3, false];