File tree 11 files changed +8
-37
lines changed
11 files changed +8
-37
lines changed Original file line number Diff line number Diff line change 13
13
14
14
use PHPUnit \Framework \TestCase ;
15
15
use Psr \Log \LoggerInterface ;
16
- use Symfony \Bridge \PhpUnit \ForwardCompatTestTrait ;
17
16
use Symfony \Component \Lock \Exception \LockConflictedException ;
18
17
use Symfony \Component \Lock \Key ;
19
18
use Symfony \Component \Lock \Lock ;
24
23
*/
25
24
class LockTest extends TestCase
26
25
{
27
- use ForwardCompatTestTrait;
28
-
29
26
public function testAcquireNoBlocking ()
30
27
{
31
28
$ key = new Key (uniqid (__METHOD__ , true ));
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
use Symfony \Component \Lock \Store \RedisStore ;
16
15
17
16
/**
18
17
* @author Jérémy Derussé <jeremy@derusse.com>
19
18
*/
20
19
abstract class AbstractRedisStoreTest extends AbstractStoreTest
21
20
{
22
- use ForwardCompatTestTrait;
23
21
use ExpiringStoreTestTrait;
24
22
25
23
/**
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
use Symfony \Component \Lock \Exception \LockConflictedException ;
16
15
use Symfony \Component \Lock \Key ;
17
16
use Symfony \Component \Lock \Store \CombinedStore ;
25
24
*/
26
25
class CombinedStoreTest extends AbstractStoreTest
27
26
{
28
- use ForwardCompatTestTrait;
29
27
use ExpiringStoreTestTrait;
30
28
31
29
/**
@@ -60,7 +58,7 @@ public function getStore()
60
58
/** @var CombinedStore */
61
59
private $ store ;
62
60
63
- private function doSetUp ()
61
+ protected function setUp ()
64
62
{
65
63
$ this ->strategy = $ this ->getMockBuilder (StrategyInterface::class)->getMock ();
66
64
$ 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 ;
15
14
use Symfony \Component \Lock \Key ;
16
15
use Symfony \Component \Lock \Store \FlockStore ;
17
16
20
19
*/
21
20
class FlockStoreTest extends AbstractStoreTest
22
21
{
23
- use ForwardCompatTestTrait;
24
22
use BlockingStoreTestTrait;
25
23
26
24
/**
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
use Symfony \Component \Lock \Store \MemcachedStore ;
16
15
17
16
/**
21
20
*/
22
21
class MemcachedStoreTest extends AbstractStoreTest
23
22
{
24
- use ForwardCompatTestTrait;
25
23
use ExpiringStoreTestTrait;
26
24
27
- private static function doSetUpBeforeClass ()
25
+ public static function setUpBeforeClass ()
28
26
{
29
27
$ memcached = new \Memcached ();
30
28
$ 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
16
* @author Jérémy Derussé <jeremy@derusse.com>
18
17
*/
19
18
class PredisStoreTest extends AbstractRedisStoreTest
20
19
{
21
- use ForwardCompatTestTrait;
22
-
23
- private static function doSetUpBeforeClass ()
20
+ public static function setUpBeforeClass ()
24
21
{
25
22
$ redis = new \Predis \Client ('tcp:// ' .getenv ('REDIS_HOST ' ).':6379 ' );
26
23
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
16
* @author Jérémy Derussé <jeremy@derusse.com>
20
19
*/
21
20
class RedisArrayStoreTest extends AbstractRedisStoreTest
22
21
{
23
- use ForwardCompatTestTrait;
24
-
25
- private static function doSetUpBeforeClass ()
22
+ public static function setUpBeforeClass ()
26
23
{
27
24
if (!class_exists ('RedisArray ' )) {
28
25
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
16
* @author Jérémy Derussé <jeremy@derusse.com>
20
19
*/
21
20
class RedisClusterStoreTest extends AbstractRedisStoreTest
22
21
{
23
- use ForwardCompatTestTrait;
24
-
25
- private static function doSetUpBeforeClass ()
22
+ public static function setUpBeforeClass ()
26
23
{
27
24
if (!class_exists ('RedisCluster ' )) {
28
25
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
16
* @author Jérémy Derussé <jeremy@derusse.com>
20
19
*/
21
20
class RedisStoreTest extends AbstractRedisStoreTest
22
21
{
23
- use ForwardCompatTestTrait;
24
-
25
- private static function doSetUpBeforeClass ()
22
+ public static function setUpBeforeClass ()
26
23
{
27
24
if (!@((new \Redis ())->connect (getenv ('REDIS_HOST ' )))) {
28
25
$ 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 ;
16
15
use Symfony \Component \Lock \Strategy \ConsensusStrategy ;
17
16
18
17
/**
19
18
* @author Jérémy Derussé <jeremy@derusse.com>
20
19
*/
21
20
class ConsensusStrategyTest extends TestCase
22
21
{
23
- use ForwardCompatTestTrait;
24
-
25
22
/** @var ConsensusStrategy */
26
23
private $ strategy ;
27
24
28
- private function doSetUp ()
25
+ protected function setUp ()
29
26
{
30
27
$ this ->strategy = new ConsensusStrategy ();
31
28
}
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 ;
16
15
use Symfony \Component \Lock \Strategy \UnanimousStrategy ;
17
16
18
17
/**
19
18
* @author Jérémy Derussé <jeremy@derusse.com>
20
19
*/
21
20
class UnanimousStrategyTest extends TestCase
22
21
{
23
- use ForwardCompatTestTrait;
24
-
25
22
/** @var UnanimousStrategy */
26
23
private $ strategy ;
27
24
28
- private function doSetUp ()
25
+ protected function setUp ()
29
26
{
30
27
$ this ->strategy = new UnanimousStrategy ();
31
28
}
You can’t perform that action at this time.
0 commit comments