This repository was archived by the owner on Jan 30, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +24
-16
lines changed Expand file tree Collapse file tree 4 files changed +24
-16
lines changed Original file line number Diff line number Diff line change 17
17
"zendframework/zend-stdlib" : " ~2.5"
18
18
},
19
19
"require-dev" : {
20
- "zendframework/zend-filter" : " ~2.5 " ,
20
+ "zendframework/zend-filter" : " ~2.6 " ,
21
21
"zendframework/zend-i18n" : " ~2.5" ,
22
22
"zendframework/zend-servicemanager" : " ~2.5" ,
23
23
"zendframework/zend-validator" : " ~2.5" ,
24
+ "zendframework/zend-progressbar" : " ~2.5" ,
25
+ "zendframework/zend-session" : " ~2.5" ,
24
26
"fabpot/php-cs-fixer" : " 1.7.*" ,
25
27
"phpunit/PHPUnit" : " ~4.0"
26
28
},
Original file line number Diff line number Diff line change 10
10
namespace Zend \File \Transfer \Adapter ;
11
11
12
12
use Zend \Filter \FilterPluginManager as BaseManager ;
13
+ use Zend \Filter \File ;
13
14
14
15
/**
15
16
* Plugin manager implementation for the filter chain.
20
21
*/
21
22
class FilterPluginManager extends BaseManager
22
23
{
23
- /**
24
- * Default set of filters
25
- *
26
- * @var array
27
- */
28
- protected $ aliases = [
29
- 'decrypt ' => 'filedecrypt ' ,
30
- 'encrypt ' => 'fileencrypt ' ,
31
- 'lowercase ' => 'filelowercase ' ,
32
- 'rename ' => 'filerename ' ,
33
- 'uppercase ' => 'fileuppercase ' ,
34
- ];
24
+
25
+ public function __construct ($ configOrContainerInstance = null , array $ v3config = [])
26
+ {
27
+ parent ::__construct ($ configOrContainerInstance , $ v3config );
28
+
29
+ $ this ->aliases = array_merge (array (
30
+ 'decrypt ' => File \Decrypt::class,
31
+ 'encrypt ' => File \Encrypt::class,
32
+ 'lowercase ' => File \LowerCase::class,
33
+ 'rename ' => File \Rename::class,
34
+ 'uppercase ' => File \UpperCase::class
35
+ ), $ this ->aliases );
36
+ }
37
+
35
38
}
39
+
Original file line number Diff line number Diff line change @@ -301,7 +301,7 @@ public function testGetFilterShouldReturnNullWhenNoMatchingIdentifierExists()
301
301
302
302
public function testAdapterShouldAllowPullingFiltersByFile ()
303
303
{
304
- $ this ->adapter ->addFilter ('Boolean ' , 1 , 'foo ' );
304
+ $ this ->adapter ->addFilter ('Boolean ' , [ 1 ] , 'foo ' );
305
305
$ filters = $ this ->adapter ->getFilters ('foo ' );
306
306
$ this ->assertEquals (1 , count ($ filters ));
307
307
$ filter = array_shift ($ filters );
Original file line number Diff line number Diff line change 18
18
*/
19
19
class HttpTestMockAdapter extends Adapter \Http
20
20
{
21
+ static $ aa = true ;
22
+
21
23
public function __construct ()
22
24
{
23
25
self ::$ callbackApc = ['ZendTest\File\Transfer\Adapter\HttpTestMockAdapter ' , 'apcTest ' ];
@@ -36,7 +38,7 @@ public function isValidParent($files = null)
36
38
37
39
public static function isApcAvailable ()
38
40
{
39
- return true ;
41
+ return static :: $ aa ;
40
42
}
41
43
42
44
public static function apcTest ($ id )
@@ -50,7 +52,7 @@ public static function uPTest($id)
50
52
}
51
53
52
54
public function switchApcToUP ()
53
- {
55
+ { static :: $ aa = false ;
54
56
self ::$ callbackApc = null ;
55
57
self ::$ callbackUploadProgress = ['ZendTest\File\Transfer\Adapter\HttpTestMockAdapter ' , 'uPTest ' ];
56
58
}
You can’t perform that action at this time.
0 commit comments