bandwidthThrottle\tokenBucket\storage\SharedStorageTest::testStoragesDontInterfere PHP Méthode

testStoragesDontInterfere() public méthode

Tests two storages with different names don't interfere each other.
public testStoragesDontInterfere ( callable $factory )
$factory callable The storage factory.
    public function testStoragesDontInterfere(callable $factory)
    {
        $storageA = call_user_func($factory, "A");
        $storageA->bootstrap(0);
        $storageA->getMicrotime();
        $this->storages[] = $storageA;
        $storageB = call_user_func($factory, "B");
        $storageB->bootstrap(0);
        $storageB->getMicrotime();
        $this->storages[] = $storageB;
        $storageA->setMicrotime(1);
        $storageB->setMicrotime(2);
        $this->assertNotEquals($storageA->getMicrotime(), $storageB->getMicrotime());
    }