X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;ds=inline;f=vendor%2Fdoctrine%2Fcache%2Ftests%2FDoctrine%2FTests%2FCommon%2FCache%2FMongoDBCacheTest.php;fp=vendor%2Fdoctrine%2Fcache%2Ftests%2FDoctrine%2FTests%2FCommon%2FCache%2FMongoDBCacheTest.php;h=0000000000000000000000000000000000000000;hb=5e458ff8cb4924fd5fa03b80d8edfcc52fe43479;hp=fa7cfacd1d345d7fb088e8b5769b5917dd61d034;hpb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;p=yaffs-website diff --git a/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/MongoDBCacheTest.php b/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/MongoDBCacheTest.php deleted file mode 100644 index fa7cfacd1..000000000 --- a/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/MongoDBCacheTest.php +++ /dev/null @@ -1,68 +0,0 @@ -=')) { - $this->markTestSkipped('Mongo >= 1.3.0 is required.'); - } - - $mongo = new MongoClient(); - $this->collection = $mongo->selectCollection('doctrine_common_cache', 'test'); - } - - protected function tearDown() - { - if ($this->collection instanceof MongoCollection) { - $this->collection->drop(); - } - } - - public function testGetStats() - { - $cache = $this->_getCacheDriver(); - $stats = $cache->getStats(); - - $this->assertNull($stats[Cache::STATS_HITS]); - $this->assertNull($stats[Cache::STATS_MISSES]); - $this->assertGreaterThan(0, $stats[Cache::STATS_UPTIME]); - $this->assertEquals(0, $stats[Cache::STATS_MEMORY_USAGE]); - $this->assertNull($stats[Cache::STATS_MEMORY_AVAILABLE]); - } - - /** - * @group 108 - */ - public function testMongoCursorExceptionsDoNotBubbleUp() - { - /* @var $collection \MongoCollection|\PHPUnit_Framework_MockObject_MockObject */ - $collection = $this->getMock('MongoCollection', array(), array(), '', false); - - $collection->expects(self::once())->method('update')->willThrowException(new \MongoCursorException()); - - $cache = new MongoDBCache($collection); - - self::assertFalse($cache->save('foo', 'bar')); - } - - protected function _getCacheDriver() - { - return new MongoDBCache($this->collection); - } -}