11
11
12
12
namespace FOS \HttpCache \Tests \Unit ;
13
13
14
+ use FOS \HttpCache \Exception \InvalidTagException ;
14
15
use FOS \HttpCache \ProxyClient \HttpDispatcher ;
15
16
use FOS \HttpCache \ProxyClient \Invalidation \TagCapable ;
16
- use FOS \HttpCache \ResponseTagger ;
17
17
use FOS \HttpCache \ProxyClient \Varnish ;
18
- use FOS \HttpCache \Exception \ InvalidTagException ;
18
+ use FOS \HttpCache \ResponseTagger ;
19
19
use Psr \Http \Message \ResponseInterface ;
20
20
21
21
class ResponseTaggerTest extends \PHPUnit_Framework_TestCase
@@ -104,10 +104,10 @@ public function testStrictEmptyTag()
104
104
$ httpAdapter = new HttpDispatcher (['localhost ' ], 'localhost ' );
105
105
$ proxyClient = new Varnish ($ httpAdapter );
106
106
107
- $ tagHandler = new ResponseTagger ($ proxyClient , array ( 'strict ' => true ) );
107
+ $ tagHandler = new ResponseTagger ($ proxyClient , [ 'strict ' => true ] );
108
108
109
109
try {
110
- $ tagHandler ->addTags (array ( 'post-1 ' , false ) );
110
+ $ tagHandler ->addTags ([ 'post-1 ' , false ] );
111
111
$ this ->fail ('Expected exception ' );
112
112
} catch (InvalidTagException $ e ) {
113
113
// success
@@ -124,7 +124,7 @@ public function testNonStrictEmptyTag()
124
124
->getMock ();
125
125
126
126
$ tagHandler = new ResponseTagger ($ proxyClient );
127
- $ tagHandler ->addTags (array ( 'post-1 ' , false , null , '' ) );
127
+ $ tagHandler ->addTags ([ 'post-1 ' , false , null , '' ] );
128
128
$ this ->assertTrue ($ tagHandler ->hasTags ());
129
129
$ this ->assertEquals ('post-1 ' , $ tagHandler ->getTagsHeaderValue ());
130
130
}
0 commit comments