db backup prior to drupal security update
[yaffs-website] / vendor / symfony / http-kernel / Tests / Profiler / MemcacheProfilerStorageTest.php
1 <?php
2
3 /*
4  * This file is part of the Symfony package.
5  *
6  * (c) Fabien Potencier <fabien@symfony.com>
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11
12 namespace Symfony\Component\HttpKernel\Tests\Profiler;
13
14 use Symfony\Component\HttpKernel\Profiler\MemcacheProfilerStorage;
15 use Symfony\Component\HttpKernel\Tests\Profiler\Mock\MemcacheMock;
16
17 /**
18  * @group legacy
19  */
20 class MemcacheProfilerStorageTest extends AbstractProfilerStorageTest
21 {
22     protected static $storage;
23
24     protected function setUp()
25     {
26         $memcacheMock = new MemcacheMock();
27         $memcacheMock->addServer('127.0.0.1', 11211);
28
29         self::$storage = new MemcacheProfilerStorage('memcache://127.0.0.1:11211', '', '', 86400);
30         self::$storage->setMemcache($memcacheMock);
31
32         if (self::$storage) {
33             self::$storage->purge();
34         }
35     }
36
37     protected function tearDown()
38     {
39         if (self::$storage) {
40             self::$storage->purge();
41             self::$storage = false;
42         }
43     }
44
45     /**
46      * @return \Symfony\Component\HttpKernel\Profiler\ProfilerStorageInterface
47      */
48     protected function getStorage()
49     {
50         return self::$storage;
51     }
52 }