PHP Class bandwidthThrottle\tokenBucket\storage\MemcachedStorageTest

These tests need the environment variable MEMCACHE_HOST.
See also: MemcachedStorage
Author: Markus Malkusch ([email protected])
Inheritance: extends PHPUnit_Framework_TestCase
Show file Open project: bandwidth-throttle/token-bucket

Public Methods

Method Description
testBootstrapFails ( ) Tests bootstrap() fails.
testBootstrapReturnsSilentlyIfKeyExists ( ) Tests bootstrap() returns silenty if the key exists already.
testGetMicrotimeFails ( ) Tests getMicrotime() fails.
testIsBootstrappedFails ( ) Tests isBootstrapped() fails
testRemoveFails ( ) Tests remove() fails
testSetMicrotimeFails ( ) Tests setMicrotime() fails.
testSetMicrotimeFailsIfGetMicrotimeNotCalledFirst ( ) Tests setMicrotime() fails if getMicrotime() wasn't called first.
testSetMicrotimeReturnsSilentlyIfCASFailed ( ) Tests setMicrotime() returns silenty if the cas operation failed.

Protected Methods

Method Description
setUp ( )
tearDown ( )

Method Details

setUp() protected method

protected setUp ( )

tearDown() protected method

protected tearDown ( )

testBootstrapFails() public method

Tests bootstrap() fails.
public testBootstrapFails ( )

testBootstrapReturnsSilentlyIfKeyExists() public method

Tests bootstrap() returns silenty if the key exists already.

testGetMicrotimeFails() public method

Tests getMicrotime() fails.

testIsBootstrappedFails() public method

Tests isBootstrapped() fails

testRemoveFails() public method

Tests remove() fails
public testRemoveFails ( )

testSetMicrotimeFails() public method

Tests setMicrotime() fails.

testSetMicrotimeFailsIfGetMicrotimeNotCalledFirst() public method

Tests setMicrotime() fails if getMicrotime() wasn't called first.

testSetMicrotimeReturnsSilentlyIfCASFailed() public method

Tests setMicrotime() returns silenty if the cas operation failed.