/**
  * @dataProvider cacheAvailabilityProvider
  */
 public function testCacheAvailability($localCache, $distributedCache, $lockingCache, $expectedLocalCache, $expectedDistributedCache, $expectedLockingCache)
 {
     $logger = $this->getMockBuilder('\\OCP\\ILogger')->getMock();
     $factory = new \OC\Memcache\Factory('abc', $logger, $localCache, $distributedCache, $lockingCache);
     $this->assertTrue(is_a($factory->createLocal(), $expectedLocalCache));
     $this->assertTrue(is_a($factory->createDistributed(), $expectedDistributedCache));
     $this->assertTrue(is_a($factory->createLocking(), $expectedLockingCache));
 }
Exemple #2
0
	/**
	 * @dataProvider cacheAvailabilityProvider
	 */
	public function testCacheAvailability($localCache, $distributedCache, $lockingCache,
		$expectedLocalCache, $expectedDistributedCache, $expectedLockingCache) {
		$factory = new \OC\Memcache\Factory('abc', $localCache, $distributedCache, $lockingCache);
		$this->assertTrue(is_a($factory->createLocal(), $expectedLocalCache));
		$this->assertTrue(is_a($factory->createDistributed(), $expectedDistributedCache));
		$this->assertTrue(is_a($factory->createLocking(), $expectedLockingCache));
	}