File tree Expand file tree Collapse file tree 5 files changed +34
-22
lines changed Expand file tree Collapse file tree 5 files changed +34
-22
lines changed Original file line number Diff line number Diff line change 25
25
"require" : {
26
26
"php" : " >=5.5.9" ,
27
27
"psr/cache" : " ~1.0" ,
28
- "cache/tag-interop" : " ^1.0" ,
29
- "symfony/phpunit-bridge" : " ^5.1"
28
+ "cache/tag-interop" : " ^1.0"
30
29
},
31
30
"require-dev" : {
32
31
"cache/cache" : " ^1.0" ,
33
32
"symfony/cache" : " ^3.4.31|^4.3.4|^5.0" ,
33
+ "symfony/phpunit-bridge" : " ^5.1" ,
34
34
"illuminate/cache" : " ^5.4|^5.5|^5.6" ,
35
35
"tedivm/stash" : " ^0.14" ,
36
36
"mockery/mockery" : " ^1.0"
Original file line number Diff line number Diff line change 14
14
use PHPUnit \Framework \TestCase ;
15
15
use Psr \Cache \CacheItemInterface ;
16
16
use Psr \Cache \CacheItemPoolInterface ;
17
- use Symfony \Bridge \PhpUnit \SetUpTearDownTrait ;
18
17
19
18
abstract class CachePoolTest extends TestCase
20
19
{
21
- use SetUpTearDownTrait;
22
-
23
20
/**
24
21
* @type array with functionName => reason.
25
22
*/
@@ -35,12 +32,18 @@ abstract class CachePoolTest extends TestCase
35
32
*/
36
33
abstract public function createCachePool ();
37
34
38
- private function doSetUp ()
35
+ /**
36
+ * @before
37
+ */
38
+ public function setupService ()
39
39
{
40
40
$ this ->cache = $ this ->createCachePool ();
41
41
}
42
42
43
- private function doTearDown ()
43
+ /**
44
+ * @after
45
+ */
46
+ public function tearDownService ()
44
47
{
45
48
if ($ this ->cache !== null ) {
46
49
$ this ->cache ->clear ();
Original file line number Diff line number Diff line change 13
13
14
14
use PHPUnit \Framework \TestCase ;
15
15
use Psr \Cache \CacheItemPoolInterface ;
16
- use Symfony \Bridge \PhpUnit \SetUpTearDownTrait ;
17
16
18
17
/**
19
18
* @author Tobias Nyholm <[email protected] >
20
19
*/
21
20
abstract class HierarchicalCachePoolTest extends TestCase
22
21
{
23
- use SetUpTearDownTrait;
24
-
25
22
/**
26
23
* @type array with functionName => reason.
27
24
*/
@@ -37,12 +34,18 @@ abstract class HierarchicalCachePoolTest extends TestCase
37
34
*/
38
35
abstract public function createCachePool ();
39
36
40
- private function doSetUp ()
37
+ /**
38
+ * @before
39
+ */
40
+ public function setupService ()
41
41
{
42
42
$ this ->cache = $ this ->createCachePool ();
43
43
}
44
44
45
- private function doTearDown ()
45
+ /**
46
+ * @after
47
+ */
48
+ public function tearDownService ()
46
49
{
47
50
if ($ this ->cache !== null ) {
48
51
$ this ->cache ->clear ();
Original file line number Diff line number Diff line change 13
13
14
14
use PHPUnit \Framework \TestCase ;
15
15
use Psr \SimpleCache \CacheInterface ;
16
- use Symfony \Bridge \PhpUnit \SetUpTearDownTrait ;
17
16
18
17
abstract class SimpleCacheTest extends TestCase
19
18
{
20
- use SetUpTearDownTrait;
21
-
22
19
/**
23
20
* @type array with functionName => reason.
24
21
*/
@@ -49,12 +46,18 @@ public function advanceTime($seconds)
49
46
sleep ($ seconds );
50
47
}
51
48
52
- private function doSetUp ()
49
+ /**
50
+ * @before
51
+ */
52
+ public function setupService ()
53
53
{
54
54
$ this ->cache = $ this ->createSimpleCache ();
55
55
}
56
56
57
- private function doTearDown ()
57
+ /**
58
+ * @after
59
+ */
60
+ public function tearDownService ()
58
61
{
59
62
if ($ this ->cache !== null ) {
60
63
$ this ->cache ->clear ();
Original file line number Diff line number Diff line change 13
13
14
14
use Cache \TagInterop \TaggableCacheItemPoolInterface ;
15
15
use PHPUnit \Framework \TestCase ;
16
- use Symfony \Bridge \PhpUnit \SetUpTearDownTrait ;
17
16
18
17
/**
19
18
* @author Tobias Nyholm <[email protected] >
20
19
*/
21
20
abstract class TaggableCachePoolTest extends TestCase
22
21
{
23
- use SetUpTearDownTrait;
24
-
25
22
/**
26
23
* @type array with functionName => reason.
27
24
*/
@@ -37,12 +34,18 @@ abstract class TaggableCachePoolTest extends TestCase
37
34
*/
38
35
abstract public function createCachePool ();
39
36
40
- private function doSetUp ()
37
+ /**
38
+ * @before
39
+ */
40
+ public function setupService ()
41
41
{
42
42
$ this ->cache = $ this ->createCachePool ();
43
43
}
44
44
45
- private function doTearDown ()
45
+ /**
46
+ * @after
47
+ */
48
+ public function tearDownService ()
46
49
{
47
50
if ($ this ->cache !== null ) {
48
51
$ this ->cache ->clear ();
You can’t perform that action at this time.
0 commit comments