File tree 8 files changed +34
-8
lines changed
8 files changed +34
-8
lines changed Original file line number Diff line number Diff line change 11
11
12
12
namespace Symfony \Component \Lock \Tests \Store ;
13
13
14
+ use Symfony \Bridge \PhpUnit \ForwardCompatTestTrait ;
14
15
use Symfony \Component \Lock \Exception \LockConflictedException ;
15
16
use Symfony \Component \Lock \Key ;
16
17
use Symfony \Component \Lock \Store \CombinedStore ;
24
25
*/
25
26
class CombinedStoreTest extends AbstractStoreTest
26
27
{
28
+ use ForwardCompatTestTrait;
27
29
use ExpiringStoreTestTrait;
28
30
29
31
/**
@@ -58,7 +60,7 @@ public function getStore()
58
60
/** @var CombinedStore */
59
61
private $ store ;
60
62
61
- protected function setUp ()
63
+ private function doSetUp ()
62
64
{
63
65
$ this ->strategy = $ this ->getMockBuilder (StrategyInterface::class)->getMock ();
64
66
$ this ->store1 = $ this ->getMockBuilder (StoreInterface::class)->getMock ();
Original file line number Diff line number Diff line change 11
11
12
12
namespace Symfony \Component \Lock \Tests \Store ;
13
13
14
+ use Symfony \Bridge \PhpUnit \ForwardCompatTestTrait ;
14
15
use Symfony \Component \Lock \Store \MemcachedStore ;
15
16
16
17
/**
20
21
*/
21
22
class MemcachedStoreTest extends AbstractStoreTest
22
23
{
24
+ use ForwardCompatTestTrait;
23
25
use ExpiringStoreTestTrait;
24
26
25
- public static function setupBeforeClass ()
27
+ private static function doSetUpBeforeClass ()
26
28
{
27
29
$ memcached = new \Memcached ();
28
30
$ memcached ->addServer (getenv ('MEMCACHED_HOST ' ), 11211 );
Original file line number Diff line number Diff line change 11
11
12
12
namespace Symfony \Component \Lock \Tests \Store ;
13
13
14
+ use Symfony \Bridge \PhpUnit \ForwardCompatTestTrait ;
15
+
14
16
/**
15
17
* @author Jérémy Derussé <jeremy@derusse.com>
16
18
*/
17
19
class PredisStoreTest extends AbstractRedisStoreTest
18
20
{
19
- public static function setupBeforeClass ()
21
+ use ForwardCompatTestTrait;
22
+
23
+ private static function doSetUpBeforeClass ()
20
24
{
21
25
$ redis = new \Predis \Client ('tcp:// ' .getenv ('REDIS_HOST ' ).':6379 ' );
22
26
try {
Original file line number Diff line number Diff line change 11
11
12
12
namespace Symfony \Component \Lock \Tests \Store ;
13
13
14
+ use Symfony \Bridge \PhpUnit \ForwardCompatTestTrait ;
15
+
14
16
/**
15
17
* @author Jérémy Derussé <jeremy@derusse.com>
16
18
*
17
19
* @requires extension redis
18
20
*/
19
21
class RedisArrayStoreTest extends AbstractRedisStoreTest
20
22
{
21
- public static function setupBeforeClass ()
23
+ use ForwardCompatTestTrait;
24
+
25
+ private static function doSetUpBeforeClass ()
22
26
{
23
27
if (!class_exists ('RedisArray ' )) {
24
28
self ::markTestSkipped ('The RedisArray class is required. ' );
Original file line number Diff line number Diff line change 11
11
12
12
namespace Symfony \Component \Lock \Tests \Store ;
13
13
14
+ use Symfony \Bridge \PhpUnit \ForwardCompatTestTrait ;
15
+
14
16
/**
15
17
* @author Jérémy Derussé <jeremy@derusse.com>
16
18
*
17
19
* @requires extension redis
18
20
*/
19
21
class RedisClusterStoreTest extends AbstractRedisStoreTest
20
22
{
21
- public static function setupBeforeClass ()
23
+ use ForwardCompatTestTrait;
24
+
25
+ private static function doSetUpBeforeClass ()
22
26
{
23
27
if (!class_exists ('RedisCluster ' )) {
24
28
self ::markTestSkipped ('The RedisCluster class is required. ' );
Original file line number Diff line number Diff line change 11
11
12
12
namespace Symfony \Component \Lock \Tests \Store ;
13
13
14
+ use Symfony \Bridge \PhpUnit \ForwardCompatTestTrait ;
15
+
14
16
/**
15
17
* @author Jérémy Derussé <jeremy@derusse.com>
16
18
*
17
19
* @requires extension redis
18
20
*/
19
21
class RedisStoreTest extends AbstractRedisStoreTest
20
22
{
21
- public static function setupBeforeClass ()
23
+ use ForwardCompatTestTrait;
24
+
25
+ private static function doSetUpBeforeClass ()
22
26
{
23
27
if (!@((new \Redis ())->connect (getenv ('REDIS_HOST ' )))) {
24
28
$ e = error_get_last ();
Original file line number Diff line number Diff line change 12
12
namespace Symfony \Component \Lock \Tests \Strategy ;
13
13
14
14
use PHPUnit \Framework \TestCase ;
15
+ use Symfony \Bridge \PhpUnit \ForwardCompatTestTrait ;
15
16
use Symfony \Component \Lock \Strategy \ConsensusStrategy ;
16
17
17
18
/**
18
19
* @author Jérémy Derussé <jeremy@derusse.com>
19
20
*/
20
21
class ConsensusStrategyTest extends TestCase
21
22
{
23
+ use ForwardCompatTestTrait;
24
+
22
25
/** @var ConsensusStrategy */
23
26
private $ strategy ;
24
27
25
- protected function setUp ()
28
+ private function doSetUp ()
26
29
{
27
30
$ this ->strategy = new ConsensusStrategy ();
28
31
}
Original file line number Diff line number Diff line change 12
12
namespace Symfony \Component \Lock \Tests \Strategy ;
13
13
14
14
use PHPUnit \Framework \TestCase ;
15
+ use Symfony \Bridge \PhpUnit \ForwardCompatTestTrait ;
15
16
use Symfony \Component \Lock \Strategy \UnanimousStrategy ;
16
17
17
18
/**
18
19
* @author Jérémy Derussé <jeremy@derusse.com>
19
20
*/
20
21
class UnanimousStrategyTest extends TestCase
21
22
{
23
+ use ForwardCompatTestTrait;
24
+
22
25
/** @var UnanimousStrategy */
23
26
private $ strategy ;
24
27
25
- protected function setUp ()
28
+ private function doSetUp ()
26
29
{
27
30
$ this ->strategy = new UnanimousStrategy ();
28
31
}
You can’t perform that action at this time.
0 commit comments